I've got a QCRenderer that I init offscreen (initOffScreenWithSize: ...), with the this colorspace: CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);

If I render a composition and take a snapshot with CIImage, like this, the output image is incorrectly colored.

CIImage *ciframe = [renderer createSnapshotImageOfType: @"CIImage"];
NSBitmapImageRep *nsibir = [[NSBitmapImageRep alloc] initWithCIImage: ciframe]; [[nsibir representationUsingType: NSPNGFileType properties: nil] writeToFile: @"/Users/cwright/desktop/image.png" atomically: NO];
[nsibir release];

output Image:

<<inline: image-ciimage.png>>




But If I take a snapshot with CGImage, the output file is correct:

CGImageRef cgframe = [renderer createSnapshotImageOfType: @"CGImage"];
NSBitmapImageRep *nsibir = [[NSBitmapImageRep alloc] initWithCGImage: cgframe]; [[nsibir representationUsingType: NSPNGFileType properties: nil] writeToFile: @"/Users/cwright/desktop/image.png" atomically: NO];
[nsibir release];

Output Image:

<<inline: image-cgimage.png>>




This looks like a simple color channel swizzling issue (ARGB vs BGRA), but I'm wondering if this is a bug in the snapshot code, or if I'm omitting something simple to compensate for this...

--
[ 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