Re: can a Cocoa app scale jpeg images as nicely as Preview does?
Re: can a Cocoa app scale jpeg images as nicely as Preview does?
- Subject: Re: can a Cocoa app scale jpeg images as nicely as Preview does?
- From: Ali Ozer <email@hidden>
- Date: Thu, 6 Oct 2005 13:02:00 -0700
You can get better scaling via -[NSGraphicsContext
setImageInterpolation:NSImageInterpolationHigh].
Ali
Begin forwarded message:
From: Mike Morton <email@hidden>
Date: October 6, 2005 9:34:33 AM PDT
To: Cocoa-Dev <email@hidden>
Subject: can a Cocoa app scale jpeg images as nicely as Preview does?
Folks --
When I load a jpeg image into my app and shrink it, certain images
look pretty awful. When I open the same image in Preview and Zoom
Out a bunch of times, it briefly looks awful, but then it sharpens
up and looks great.
For example, try grabbing <http://images.amazon.com/images/P/
B000006TRV.01._SCLZZZZZZZ_.jpg> and doing Zoom Out six times,
scaling it down 8x in each dimension. You can almost read the text.
When I scale that image by the same amount in a simple Cocoa app
(by resizing the NSImage or by making the NSImageView the right
size), it comes out pretty ugly
I’m sure there are techniques and libraries out there to do this,
but I thought NSImage would do a good job right out of the box...
Thanks,
-- Mike
_______________________________________________
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