Re: NSImage and PNG problems
Re: NSImage and PNG problems
- Subject: Re: NSImage and PNG problems
- From: j o a r <email@hidden>
- Date: Tue, 14 Nov 2006 17:57:18 +0100
On 14 nov 2006, at 17.39, Christian Moen wrote:
the image size becomes 42x42 although the image size actually is
175x175. The description selector gives the following:
NSImage 0x31e2d0 Name=White 1 Size={42, 42} Reps=(
NSBitmapImageRep 0x3987a0 Size={42, 42}
ColorSpace=NSCalibratedRGBColorSpace BPS=16 BPP=64 Pixels=175x175
Alpha=YES Planar=NO Format=2
I don't understand why the image size becomes 42x42 rather than
175x175.
Your mistake is in thinking that "size" and "pixel dimensions" are
the same thing, when they're not. They can have the same values, but
that doesn't have to be the case. You are likely to see this effect
if a bitmap image file specifies a resolution that differs from the
resolution of your monitor.
If you want to make sure that the size in pixels on screen is the
same as the pixel dimensions of your NSBitmapImageRep, you need to
check the pixel dimensions and update the size accordingly.
I'm sure you can find more information about this in the list
archives, now that you know what's going on.
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