【问题标题】:warning on CGBitmapContextCreateCGBitmapContextCreate 上的警告
【发布时间】:2012-05-25 05:12:37
【问题描述】:
CGColorSpaceRef colorSpace = CGImageGetColorSpace([UIImage imageNamed:@"shirtWhite.jpeg"]); 
    CGContextRef context = CGBitmapContextCreate (nil,
                                                  width,
                                                  height,
                                                  CGImageGetBitsPerComponent(imageToTest.image),
                                                  CGImageGetBytesPerRow(imageToTest.image),
                                                  colorSpace,
                                                  CGImageGetAlphaInfo(imageToTest.image));

我在传递图像的每一行都收到警告。 警告是“警告:从不兼容的指针类型传递'CGImageGetColorSpace'的参数1

警告:从不兼容的指针类型传递“CGImageGetBitsPerComponent”的参数 1

"

【问题讨论】:

    标签: iphone ios


    【解决方案1】:

    已解决:传递 CGImage 而不是图像

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 2013-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多