Re: Strange issue with PNG files
Eric Gorr <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mar 4, 2010, at 2:06 PM, Avi Drissman wrote: > It's apparently not a 72ppi picture. Even though the image is 16x14 pixels, at ~200ppi something 14 pixels high is only 5 points high. > > You are getting the full image, and I bet if you took the NSImageRep and asked it for -pixelsHigh or -pixelsWide you'd get the 14 and 16. Yes, that is true. > If you want to draw it pixel for pixel despite the high ppi, use -pixelsHigh/-pixelsWide, create an NSSize of that size, and draw it "scaled". So, the only/recommended way to determine when an image is in this state is to compare what [image size] returns vs. pixelsHeight & pixelsWide?