NSImage from Web: Resolution
NSImage from Web: Resolution
- Subject: NSImage from Web: Resolution
- From: Matt Judy <email@hidden>
- Date: Sat, 15 Dec 2001 21:51:36 -0800
Hi,
I know that a solution for this was posted a while back, but I can't
seem to find it...
I'm using NSImages obtained from the WWW by using NSImage's initWithData
and NSURL's resourceDataUsingCache:. I then display that image in an
NSImageView. Works well.
The problem is, if the resolution of the downloaded image is higher than
72 dpi (e.g. 300 dpi), the image is rendered at that resolution,
appearing much smaller on the screen than it should. Seems like a bug
(image should match resolution of display device), but anyway...
I believe the workaround was to get the pixel height and width of the
image and then set its size, or something like that. Anyone have the
solution?
--Matt