Skip navigation.
 
mlRe: NSImage representation resolution problems
FROM : Heinrich Giesen
DATE : Tue Jan 08 16:56:32 2008

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_removed>

Related mailsAuthorDate
mlNSImage representation resolution problems Nick Forge Jan 8, 13:27
mlRe: NSImage representation resolution problems Heinrich Giesen Jan 8, 16:56
mlRe: NSImage representation resolution problems Nick Forge Jan 9, 07:12