NSCachedImageRep Class Reference

Inherits from
Conforms to
Available in OS X v10.0 and later.
Companion guide
Declared in


An NSCachedImageRep object store image data in a form that can be readily transferred to the screen. An NSCachedImageRep object differs from other image representation objects in that it simply stores the already rendered image, whereas other image representation objects generally have knowledge about how to render the image from source data.

You typically do not use this class directly. Instead, NSImage and its other image representation objects create instances of NSCachedImageRep as needed to cache versions of the rendered image. This caching speeds up screen-based drawing for existing images during subsequent rendering operations. Cached image representations are also used to capture drawing commands for images created programmatically by locking focus on an image.


Initializing an NSCachedImageRep

Getting the Representation