• 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: NSCacheImageRep woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCacheImageRep woes


  • Subject: Re: NSCacheImageRep woes
  • From: Andrew Platzer <email@hidden>
  • Date: Wed, 14 Jan 2004 16:30:33 -0800

On Jan 14, 2004, at 12:18 PM, Nicholas Francis wrote:
Hi guys - I have a small problem getting to my image data.

I load a bitmap image (tiff) using the +[NSImage imageNamed:] method, and want to access the pixel data....

However, when the user runs in 16bpp on the desktop, when looking through the bitmap's representations, I only get one NSCachedImageRep. FWIW, here is the its -description:

NSCachedImageRep 0x1980df0 Size={12, 12} ColorSpace=NSCalibratedRGBColorSpace BPS=4 Pixels=12x12 Alpha=NO

What gives? I would expect to also have the original NSBitmapImageRep that the cache is generated from. I tried looking through NSImage documentation, but can find no function I have to call to make it keep the data around.

[image setCacheMode:NSImageCacheNever];

Do this before you draw the image. By default, the system caches images if it can save space. If you are running in thousands of colours, it will render the image to a cached rep since it will take 1/2 as much space.

Andrew
_______________________________
Andrew Platzer
Application Frameworks
Apple Computer, Inc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • xcode/gdb automation
      • From: James Gregurich <email@hidden>
References: 
 >NSCacheImageRep woes (From: Nicholas Francis <email@hidden>)

  • Prev by Date: Re: NSDate and Date formatters
  • Next by Date: Re: Horizontal scrollbar is not activated in TableView
  • Previous by thread: NSCacheImageRep woes
  • Next by thread: xcode/gdb automation
  • Index(es):
    • Date
    • Thread