• 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
Re: NSBitMapImageRep Woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBitMapImageRep Woes


  • Subject: Re: NSBitMapImageRep Woes
  • From: David Duncan <email@hidden>
  • Date: Wed, 6 Jan 2010 09:35:43 -0800

On Jan 6, 2010, at 9:21 AM, David Blanton wrote:

> 	m_NSBitmapImageRep = [[NSBitmapImageRep alloc]
> 						   initWithBitmapDataPlanes:m_ptrs
> 						   pixelsWide:m_frameRect.size.width
> 						   pixelsHigh:m_frameRect.size.height
> 						   bitsPerSample:8
> 						   samplesPerPixel:4
> 						   hasAlpha:YES
> 						   isPlanar:NO
> 						   colorSpaceName:NSCalibratedRGBColorSpace
> 						   bitmapFormat:NSAlphaFirstBitmapFormat
> 						   bytesPerRow:(4 * m_frameRect.size.width)
> 						   bitsPerPixel:32];

This code creates a bitmap with alpha.

> 	context = CGBitmapContextCreate (bitmap.m_array, bitmap.m_pixelsx, bitmap.m_pixelsy, 8, bitmap.m_pixelsx * 4, colorSpace, kCGImageAlphaNoneSkipFirst|kCGBitmapByteOrder32Host);

This code creates a bitmap without alpha.

> The problem is I just see garbage, no image.  Clearly I am doing something wrong with the NSBitMapImageRep but I have no idea what.


Hence garbage.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSBitMapImageRep Woes
      • From: David Blanton <email@hidden>
References: 
 >NSBitMapImageRep Woes (From: David Blanton <email@hidden>)

  • Prev by Date: NSBitMapImageRep Woes
  • Next by Date: Re: NSBitMapImageRep Woes
  • Previous by thread: NSBitMapImageRep Woes
  • Next by thread: Re: NSBitMapImageRep Woes
  • Index(es):
    • Date
    • Thread