• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage representation resolution problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSImage representation resolution problems
      • From: Nick Forge <email@hidden>
  • Prev by Date: Re: Core Data Migration Exception
  • Next by Date: Re: Error executing instruction "[NSBezierPath bezierPath]"
  • Previous by thread: NSImage representation resolution problems
  • Next by thread: Re: NSImage representation resolution problems
  • Index(es):
    • Date
    • Thread