Re: NSImage representation resolution problems
Re: NSImage representation resolution problems
- Subject: Re: NSImage representation resolution problems
- From: Nick Forge <email@hidden>
- Date: Wed, 9 Jan 2008 17:12:53 +1100
I worked it out myself about 2 hours before your email..... I'd swear
I'd read through the NSImage documentation, but obviously I hadn't
read it hard enough.
Thanks for your help,
Nick Forge
On 09/01/2008, at 2:56 AM, Heinrich Giesen wrote:
Hi,
On 08.01.2008, at 14:16, Nick Forge wrote:
Any ideas how to get the NSView to render the image from the original
full-res version, and not the initially rendered version?
after initializing the image with:
NSImage *img = [[NSImage alloc] initWithContentsOfFile:filePath];
and before drawing it in the view add the line:
[img setDataRetained:YES];
From the docs:
Data retention is also useful if you plan to resize an image
frequently;
otherwise, resizing occurs on a cached copy of the image, which can
lose
image quality during successive scaling operations. With data
retention
enabled, the image is resized from the original source data.
Heinrich
--
Heinrich Giesen
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden