Re: NSImage representation resolution problems
Re: NSImage representation resolution problems
- Subject: Re: NSImage representation resolution problems
- From: Heinrich Giesen <email@hidden>
- Date: Tue, 8 Jan 2008 16:56:32 +0100
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