Resolution of an NSImage(Rep)?
Resolution of an NSImage(Rep)?
- Subject: Resolution of an NSImage(Rep)?
- From: Brian Postow <email@hidden>
- Date: Thu, 5 Aug 2010 10:39:23 -0400
I have an NSImage. I want to save it with a CGImageDestination. the CGImageDestination wants a resolution.
I know that the NSImage is resolution independent, but I happen to know that this image has only one NSImageRep. I also know that the image is bitmapdata. how do I get the resolution out of the NSImageRep?
I've seen:
([img size].width / [rep pixelWidth]) * 72
But that gives me 72 on an image that I know the resolution is actually 200 DPI.
The width/pixelWidth ARE correct (1696, which is what you get when you scan 8.5 inches at 200DPI) but since they're the same, I just get the 72...
Brian Postow
Senior Software Engineer
Acordex Imaging Systems
_______________________________________________
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