Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImage to CIImage - size is halved?

I'm creating a CIImage from a UIImage as follows:

CIImage* someCIImage = [CIImage imageWithCGImage:someUIImage.CGImage];

Comparing someCIImage.extent.size.width/height with someUIImage.size.width/height, I find that sometimes the CIImage is double size in dimensions, and sometimes its the same size as the UIImage.

It seems like if the UIImage is slightly larger, the CIImage is double the size, whereas if the UIImage is slightly smaller this isn't the case.

Has anyone seen this before/know why this is? This is causing me real trouble as I'm trying to draw a CIImage from a loaded UIImage.

like image 258
HHHH Avatar asked Jul 02 '12 21:07

HHHH


1 Answers

size has to do with the distance between points on the display, as so the number of points on a retina display are doubled. size does not represent the number of pixels as you assumed.

like image 156
Pétur Ingi Egilsson Avatar answered Oct 19 '22 11:10

Pétur Ingi Egilsson