*bump* I'm still pretty stuck with this. After much more reading, I've seen suggestions that for 16/32bit float colour I should use this for CGBitmapInfo:
kCGImageAlphaPremultipliedLast | kCGBitmapFloatComponents ...which still doesn't work ;( I just need to capture a 32bit float format image from a QCPlugInInputImageSource. I'm using QCPlugInPixelFormatRGBAf (there doesn't seem to be a corresponding pixel format for 16bit?!). Any ideas? Thanks Chris On 20 May 2010 16:58, Chris Wood <[email protected]> wrote: > I'm writing a QCPlugin to write images to disk (roughly based on the > ImageWriterPlugin example). Capturing higher bit depth images is > really throwing me though. > > First I'm locking the buffer rep with [QCPlugInInputImageSource > lockBufferRepresentationWithPixelFormat: colorSpace: forBounds:]. > Colorspace/bounds I get from the image, pixelformat I'm using > QCPlugInPixelFormatARGB8 for 8 bit or QCPlugInPixelFormatRGBAf for > 16/32 (I suspect a problem here: isn't the 16 bit format in QC 16bit > integer? 8/32bit should be OK though. And I'm not worrying about PPC > support.) > > Then, I'm creating a CGImage provider, followed by a CGImage using > CGImageCreate: > > cgImage = CGImageCreate([qcImage bufferPixelsWide], [qcImage > bufferPixelsHigh], bitdepth, bitdepth * 4, [qcImage > bufferBytesPerRow], colorSpace, bitmapInfo, dataProvider, NULL, false, > kCGRenderingIntentDefault); > > I think that's all OK (with the exception of the pixel format being > wrong for 16 bit, but with 16 bit being somewhat broken in QC I'm more > concerned with 8/32 bit modes) apart from the CGBitmapInfo part. For 8 > bit it's just kCGImageAlphaPremultipliedFirst, but what should I be > using for the 16/32 bit modes? I thought "kCGBitmapFloatComponents | > kCGBitmapByteOrder32Host" should cover it, but no matter what I try it > seems to either not use float values or has wrong byte ordering :/ > > Thanks > > 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]

