Confusion about Image I/O export?
Confusion about Image I/O export?
- Subject: Confusion about Image I/O export?
- From: Graham Cox <email@hidden>
- Date: Mon, 02 Sep 2013 15:09:20 +0200
I'm confused, or am I?
I'm using Image I/O to export a bitmap in PNG format. I can set the desired image resolution, which of course causes the bitmap to change size. e.g. a 128 x 128 image, with 144dpi, yields a 256 x 256 bitmap.
I export this, setting the X and Y pixels per meter to the equivalent of 144dpi. For good measure, I also set kCGImagePropertyDPIWidth and kCGImagePropertyDPIHeight to 144. The image exports fine, except that in Finder and in Preview, the image size is reported as 256 x 256, 144dpi. I'm expecting to see the image size 128 x 128 (Preview does report this size if I set the units to points). Or am I?
I think the main confusion comes from Finder reporting the image size in the icon view as 256 x 256. Why does Finder show the pixel dimensions when as an image this is not its size?
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden