• 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: 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


References: 
 >Re: NSImage representation resolution problems (From: Heinrich Giesen <email@hidden>)

  • Prev by Date: Re: Trapping user shutdown/logout/restart in Cocoa/Foundation tool
  • Next by Date: Re: Core Data Migration Exception
  • Previous by thread: Re: NSImage representation resolution problems
  • Next by thread: Text Editing without NSTextView?
  • Index(es):
    • Date
    • Thread