Compositing a CIImage to NSBitmapImage planar problems
Compositing a CIImage to NSBitmapImage planar problems
- Subject: Compositing a CIImage to NSBitmapImage planar problems
- From: Jeremy Faller <email@hidden>
- Date: Sun, 15 Oct 2006 20:50:59 -0400
All:
I am composing a CIImage to a NSBitmapImageRep using code
described in http://www.cocoabuilder.com/archive/message/cocoa/
2005/5/18/136311, like:
bitmapImageRep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
pixelsWide:outputBitmapSize.width
pixelsHigh:outputBitmapSize.height
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:0
bitsPerPixel:0];
The example code works fine, and if I:
myBMImagRep = [ciImage getNSBitmapImageRep];
[[myBMImageRep TIFFRepresenatation] writeToFile:@"/tmp/foo.tiff"
atomically:YES];
everything works fine. When I inspect the data through [bitmapData],
things are fine as well.
I am more interested in planar data, so changing the above allocation
of the to:
bitmapImageRep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
pixelsWide:outputBitmapSize.width
pixelsHigh:outputBitmapSize.height
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:YES
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:0
bitsPerPixel:0];
The code runs much more quickly, but the [bitmapData] is empty. Any
pointers on what's going on here would be appreciated.
Thanks in advance.
Best Regards,
Jeremy Faller
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden