Save NSView content as planar raw bitmap
Save NSView content as planar raw bitmap
- Subject: Save NSView content as planar raw bitmap
- From: Bertrand Mansion <email@hidden>
- Date: Tue, 28 Aug 2001 17:39:04 +0200
Hello,
I am trying to save the content of my view as a planar raw bitmap.
Here is the beginning of my code :
- (IBAction)saveImage:(id)sender
{
NSBitmapImageRep *sourceBitmap;
[view lockFocus];
sourceBitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:[view bounds]];
[view unlockFocus];
NSLog (@"isPlanar = %d\n", [sourceBitmap isPlanar]);
}
When this is executed, the console says that my bitmap is not planar
(isPlanar = 0). Unfortunately for me, I need it as a planar (3 planes R,G,B
- 8bps, 3spp) raw bitmap in order to save it on my disk for later use. I
guess this is harder to do than exporting a tiff representation.
Has anyone a rough idea on how to implement this ?
Thanks very much,
Bertrand Mansion
Mamasam