ADC Home > Reference Library > Technical Q&As > Graphics & Imaging > Quartz >

CGImageRef contents are immutable

Q: Am I allowed to change the contents of a CGImageRef once I've created it?

A: No. Quartz 2D considers the contents of a CGImageRef to be constant after creation. This allows several optimizations, including caching the contents as necessary to improve performance. In addition, this allows the printing system on Mac OS X to properly handle documents with many copies of the same image and only embed one copy in the resulting PDF spool file.

[Jul 17, 2003]

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.