Thanks for your code snippet. While I should have been sleeping last
night I suddenly thought of another approach. Instead of reading the
images into a provider from disk and then compressing them for
storage in my document I am now reading in the data in using the file
manager (that data is already compressed as PNG or JPEG) and storing
that in my document. That way I am not de- and recompressing and
stick to the format the user chose for each image. For display I draw
it once in a bitmap context and use that each time an image needs to
be drawn. The original PNG or JPEG data I keep around for when the
user saves. Now I just need to add support for PDF in a similar way.
looks like that will be sligthly more complicated than for PNG and
TIFF, but it should not be too bad.
At 17:04 -0600 9/3/05, Scott Thompson wrote:
On Mar 9, 2005, at 4:19 PM, David Niemeijer wrote:
Do you happen to have url to the documentation (or sample code) on
this around? I see a lot of QT compression related stuff, but I
guess you are referring to some particular APIs to use in
combination with CG and the providers/consumers. Ideally I would
like to store in PNG format.
Instead of creating a DataRef to a file you could look in the
QuickTime documentation and figure out how to create a DataRef into
a block of memory (probably a Handle) and then create the CFData
from that handle.
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden