• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Save NSView content as planar raw bitmap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Learning to program Cocoa
  • Next by Date: Re: C++
  • Previous by thread: Re: Drawing rounded rect
  • Next by thread: Re: SCM?
  • Index(es):
    • Date
    • Thread