Thanks Christopher.
> 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.
Helpful. OpenEXR seems like an excellent choice: it's supported 'out of the
box' it seems (at least I can open the files in preview), and QC will open
them and give me a nice useful RGBAf format texture so loading will be
trivial :) I'll keep png in there for compatability and investigate tiff -
if it supports 32bit or float i'll support that too.
>
> 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.
>
Hmm... only catch there is that the composition might be processing large
(as in 4k x 4k) images, and I'd very much like to capture at that
resolution. I'm outputting the raw image data from a published port, which
is giving me the right data:
*NSImage 0x13b2490 Size={512, 512} Reps=(*
* QCNSBitmapImageRep 0x13ae760 Size={512, 512}
ColorSpace=NSCalibratedRGBColorSpace BPS=32 BPP=128 Pixels=512x512 Alpha=YES
Planar=NO Format=4*
Question now is how do I write an openexr file? I see it there in supported
file types for NSImage ("com.ilm.openexr-image") but I've no idea how to
write out anything other than png/tiff - and NSImage only seems to support
returning a TIFF representation. Any pointers? :)
I've seen funky output from 8-bit images too - the ImageWriter example
plugin seems to suffer from it (normal 8-bit images end up looking like
6-bit!) so I doubt it's user error. Who knows? :)
Chris
_______________________________________________
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]