Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: completely and utterly confused with NSImage + MySQL




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >completely and utterly confused with NSImage + MySQL (From: Eric Smith <email@hidden>)
 >Re: completely and utterly confused with NSImage + MySQL (From: Andrew Farmer <email@hidden>)
 >Re: completely and utterly confused with NSImage + MySQL (From: Eric Smith <email@hidden>)
 >Re: completely and utterly confused with NSImage + MySQL (From: Hayden Stainsby <email@hidden>)
 >Re: completely and utterly confused with NSImage + MySQL (From: Eric Smith <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.