I'm trying to detect if some UIImage is empty OR contains image.
All the UIImages have an instance so I can't ask if image == nil
.
I tried also this code:
CGImageRef cgref = [image CGImage];
CIImage *cim = [image CIImage];
if (cim == nil && cgref == NULL)
{
NSLog(@"no underlying data");
}
But its not working for me. I also tried to convert the image to NSData and check the size of the bytes but the "empty" image size is close to the good one.
BTW - the size of all the UIImages are the same (width & height).
Any other ideas?
VS