Reputation: 170
CGImageRef inImage = (__bridge CGImageRef)(self.captureImage.image);
NSLog(@"%zu",inImage);
Why doesn't this work??
It said "NULL".
How can I change image
to CGImageRef
??
Upvotes: 0
Views: 62
Reputation: 318924
Assuming self.captureImage
is your (poorly named) UIImageView
, then you need:
CGImageRef inImage = self.captureImage.image.CGImage;
To be more clear:
UIImageView *imageView = self.captureImage;
UIImage *image = imageView.image;
CGImageRef inImage = image.CGImage;
Upvotes: 1