Hey Vade, Sorry for taking so long to get back to you on this.

On Aug 19, 2009, at 12:41 PM, vade wrote:

hello

Id love some clarification on how the colorspace: parameter on the various methods in QC work.

for lockTextureRepresentationWithColorSpace:forBounds on an QCPlugInInputImageSource, does the colorspace method decide the source colorspace of the image, or the destination colorspace? ie:

QC is going to do a conversion from whatever colorspace the image is marked as into what you request. You should request it in the format you want and don't do any conversion in your plugin.


a) (source) interpret this image as <some colorspace> and convert it to RGB since its going to be a texture and used in GL. b) (destination) interpret this image in its native colorspace and convert it to <some colorspace> ?

Similarly, for: QCPlugins outputImageProviderFromTextureWithPixelFormat:pixelsWide:pixelsHigh:name:flipped:releaseCallback:releaseContext:colorSpace:shouldColorMatch method

does this take a texture, assumed to be in RGB, and set it to be <some colorspace> or does it take a texture, assumed to be <some colorspace> and convert it to RGB, or does it take anything, as anything, and just set a marker to be <some colorspace> to be dealt with at a later stage?

Here you are creating an image and tagging it with a marker. The buffer of memory could be any colorspace, so you have to tell QC how to treat those bytes. Again you should not color correct yourself and then mark it with the new colorspace, let QC do any necessary conversions.


While we are on the topic, I would love some clarification:

Is there a default/native color space to QC? I would wager yes, and that its RGB Linear since QC operates in GL land, and that RGB linear is (am I correct) the assumed default colorspace of GL, or is the 'native' colorspace whatever the QCRenderer in question was initted with?

Color isn't really my area of expertise but I do recall that QC requires an RGB color model. Within the RGB space QC tries not to impose any color assumptions until a buffer needs to be passed to CoreImage or OpenGL which require Linear. An image is like a recipe, it has a buffer and a list of transformations and color correction can be one of those transformations. Once it has been asked to draw, it will apply all the transformations on the stack.


Thanks, id love to hear a 'short story' on a few images of various colorspaces passing through QC, and how it is converted etc. Might make a fun exercise.

That would be interesting for me also, I'll ask around here to see if anyone can provide that.
_______________________________________________
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