NSImage size
NSImage size
- Subject: NSImage size
- From: "Cook, Mike" <email@hidden>
- Date: Mon, 3 Jul 2006 13:27:28 +0100
- Thread-topic: NSImage size
If I load in an image into an NSImage and ask for its size with [image
size] I get a number that includes the resolution of the image mapped to
the resolution of the screen. This is fine for a 72 dpi image but is not
what I want for images of higher resolution.
So for example if an image is 1280 pixels wide at a resolution of 1200
dpi the size I am given is 76.8 pixels wide. This can be calculated by
(72 dip screen) *( (1280 width) / (1200 dpi)).
My question is how can I get at how wide the image is in pixels? Can I
somehow get at the dpi of a loaded image? If I could I could work it out
from what [image size} gives me.
Mike Cook
__
"Engineers know million to one chances happen nine times out of ten..."
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden