I have the problem with creating context..
I have seen lots of answer but none of this working for me.
I have the following code.
CGSize pixelSize = src_img.size;
pixelSize.width = src_img.scale* src_img.size.width;
pixelSize.height = src_img.scale*src_img.size.height;
size_t d_bytesPerRow = pixelSize.width * 4;
unsigned char *imgData = (unsigned char*)malloc(pixelSize.height * d_bytesPerRow);
CGImageRef imageRef = src_img.CGImage;
CGContextRef context = CGBitmapContextCreate(imgData,
(size_t)pixelSize.width, (size_t)pixelSize.height, 8, d_bytesPerRow,
CGImageGetColorSpace(imageRef), kCGImageAlphaNone);
In console shows me the error
CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 24 bits/pixel; 3-component color space; kCGImageAlphaNone; 1754 bytes/row.
I don't know what to do. Please help