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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to