• 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
Compositing a CIImage to NSBitmapImage planar problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSFont and determining the advancement of a given string
  • Next by Date: Re: Custom dimmed graphic for NSButton?
  • Previous by thread: WebView keyboard events
  • Next by thread: Re: Compositing a CIImage to NSBitmapImage planar problems
  • Index(es):
    • Date
    • Thread