Re: completely and utterly confused with NSImage + MySQL
Re: completely and utterly confused with NSImage + MySQL
- Subject: Re: completely and utterly confused with NSImage + MySQL
- From: j o a r <email@hidden>
- Date: Sun, 26 Feb 2006 23:10:57 +0100
On 26 feb 2006, at 22.49, Eric Smith wrote:
I have an image whose original size was 800x578. If I look at the
info in the finder, the finder says 800x578. If I drop this image
into an imageview, the image shows up as a tiny little thing (if it
was saved with compression). If I override NSImageView's setImage
so that I can inspect the image that's dropped, I see that [NSImage
size] gives me a 61x44 image.... which is the size of the little
tiny image that appears after the drop.
Why are these numbers different?
Note that the size of an NSImage is not directly related to the pixel
dimensions of an associated NSBitmapRepresentation. Some image
formats contains DPI information. Don't assume that the DPI of the
image has to be the same as the DPI of your monitor. If you want to
display your image 1:1, you need to handle this yourself. It's easy
to fix, once you know about this potential pitfall. Check the list
archives for suggestions to solutions - you're not the first one to
bump into this.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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