Hi,

I was just playing with the Image Writer Plug-in sample code - and seem to be getting unexpected color results:

Sample Code:
/* Figure out pixel format and colorspace to use */
        colorSpace = [qcImage imageColorSpace];
        if(CGColorSpaceGetModel(colorSpace) == kCGColorSpaceModelMonochrome)
        pixelFormat = QCPlugInPixelFormatI8;
        else if(CGColorSpaceGetModel(colorSpace) == kCGColorSpaceModelRGB)
        pixelFormat = QCPlugInPixelFormatARGB8;
        else
        return NO;

...

cgImage = CGImageCreate([qcImage bufferPixelsWide], [qcImage bufferPixelsHigh], 8, (pixelFormat == QCPlugInPixelFormatI8 ? 8 : 32), [qcImage bufferBytesPerRow], colorSpace, (pixelFormat == QCPlugInPixelFormatI8 ? 0 : kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host), dataProvider, NULL, false, kCGRenderingIntentDefault);
        

<<inline: PreviewScreenSnapz001.png>>




I've experimented changing the parameters of CGImageCreate().

Is the CGImage (with the default example code) supposed to always be greyscale? [ apologies if I simply have misunderstood the code] What CGImageCreate() parameters would I need to match the colorspace of the default QC context?
and
When would the [qcImage imageColorSpace] return anything other than default [linear?] RGB? In my composition QC generates the source image with a 'Render in Image' patch. What colorspace would images created internal to QC be - with color correction and without color correction? If I imported an image with a color profile, do color spaces get respected [I assume 'yes' with color correction selected]?

In what context with images created in QC would the colorSpace return as Monochrome?

I read the threads from Jonas S 'QCRenderer colorspace problems [was QCRenderer work area size]' and Raphael Sebbe 'QCRenderer and colorspace parameterizing'.

Thanks, any insights would be welcome.

Regards, Ian


*******************************
Ian Grant
Senior Lecturer in Digital Art
Faculty of the Arts
Thames Valley University
Ealing, UK
W5 5DX
<[EMAIL PROTECTED]>
*******************************



 _______________________________________________
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