0

このメソッドを例からコピーして画像にフィルターを適用しましたが、問題があります。

    CGImageRef createStandardImage(CGImageRef image) 
{
    const size_t width = CGImageGetWidth(image);
    const size_t height = CGImageGetHeight(image);
    CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
    CGContextRef ctx = CGBitmapContextCreate(NULL, width, height, 8, 4*width, space,
                                             kCGBitmapByteOrder32Big | kCGImageAlphaPremultipliedFirst);
    CGColorSpaceRelease(space);
    CGContextDrawImage(ctx, CGRectMake(0, 0, width, height), image);
    CGImageRef dstImage = CGBitmapContextCreateImage(ctx);
    CGContextRelease(ctx);
    return dstImage;
}

このメソッドを追加すると警告が表示されます...

警告:セマンティックの問題:関数'createStandardImage'の以前のプロトタイプはありません

..そして私がそれを呼び出そうとするとエラーが発生します:

エラー:セマンティックの問題:「createStandardImage」のタイプが競合しています

どうして??

4

0 に答える 0