I have a need to capture high bit depth images from QC. I'm doing most of the processing in 32bit mode, and ideally I'd like to grab images at that quality.

So, 2 quick questions:
1. What file formats should I be looking at? I know png supports at least 16bit, but does it support 32bit/floating point? FITS has been mentioned elsewhere, and seems to support pretty much everything, but I'd rather stick to something more widely useable :) How about raw? Does it support float/32bit?

OpenEXR, TIFF, or PNG all support >8 bits per channel. You'll want to tinker with ImageIO to see if there are any quirks though. I've used them all successfully. There are probably a few other formats that would work (other hdr formats), but I've not worked with them as much.

PNG doesn't support floating point pixels, as far as I know. OpenEXR does, TIFF might.

2. What's the best way to pull a >8bit image out of QC?


Create your own OpenGL context that's configured as you want (bitdepth- wise, specifically), render the composition ([qcrenderer renderAtTime:time arguments:args];), then download the context's contents as a texture. That'll require some opengl code; glReadPixels is easy but slow, async texture downloads are a bit more involved, but documented all over apple's website (or at least it was until the recent change -- I've not looked recently enough to know if it's still there or not). I'm not sure if the QCRenderer snapshotImageOfType:-style messages will preserve the full bitdepth (I've seen some cases where it doesn't preserve normal 8bit-per- channel image is used in the composition as well as for image processing of the composition output, but that could be user-error on my part), but a few lines of tests would let you know that too.

--
[ christopher wright ]
[email protected]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to