NSImage and PNG problems
NSImage and PNG problems
- Subject: NSImage and PNG problems
- From: "Christian Moen" <email@hidden>
- Date: Wed, 15 Nov 2006 01:39:54 +0900
cocoa-dev,
I'm using Xcode 2.4.1 on Mac OS X 10.4.8 and I'm having problems
working with NSImage which is created from a PNG file. When I create
my NSImage using
[NSImage imageNamed:@"White 1.png"];
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.
If I create the NSImage using a JPEG source, the image size becomes
175x175 as I expect. The description selector gives:
NSImage 0x3a27e0 Name=White 1 Size={175, 175} Reps=(
NSBitmapImageRep 0x3a1df0 Size={175, 175}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=24 Pixels=175x175
Alpha=NO Planar=NO Format=0
My questions:
1) Why do I get a 42x42 image size when using PNG?
2) How can I get the 175x175 size I would expect using PNG?
It also puzzles me that when I view my PNG file in Xcode, it's
displayed in 42x42 resolution while the JPEG version is displayed in
175x175. It further puzzles me that the file thumbnail in Groups &
Files in Xcode shows a thumbnail of a different image for both the
JPEG and PNG version.
Any insight is mostly appreciated. Thank you.
Christian
_______________________________________________
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