I copied this method from an example to apply filters to an image but I have a problem:
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;
}
I have a warning when I add this method...
warning: Semantic Issue: No previous prototype for function 'createStandardImage'
..and i have a error if I try to call it:
error: Semantic Issue: Conflicting types for 'createStandardImage'
why??