Re: Problem of resolution with JPEGs
Re: Problem of resolution with JPEGs
- Subject: Re: Problem of resolution with JPEGs
- From: Darrin Cardani <email@hidden>
- Date: Mon, 14 Mar 2005 13:47:39 -0600
At 11:23 AM -0800 3/14/05, Arthur VIGAN <email@hidden> wrote:
I have a problem with NSImage. When I open some JPEGs, and draw the
image in a view, the size is wrong: I can see the pixels, and the
resolution is really bad, even when I have high definition images. Do
you know where the problem comes from?
NSImage uses the photo's resolution to scale it to the proper size
(or something close to it) on screen. So a 300x300 pixel image with a
resolution of 300 dpi will get scaled down to roughly 1 inch by 1
inch on screen, which will probably only be 72 pixels by 72 pixels.
What you need to do is get the image's NSBitmapImageRep and call
[imageRep pixelsWide] and [imageRep pixelsHigh] to get the pixel
dimensions of the image. That should give you what you want.
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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