• 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: NSBitmapImageContext from Word *
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBitmapImageContext from Word *


  • Subject: Re: NSBitmapImageContext from Word *
  • From: Greg Best <email@hidden>
  • Date: Fri, 10 Mar 2006 02:01:13 -0800

Is it because you have bitsPerSample=5, samplesPerPixel=3 and bitsPerPixel=16?


On Mar 9, 2006, at 5:19 PM, David Kopec wrote:

Hi everyone,
I'm attempting to put
WORD *WorkFrame;
which points to
WORD DoubleFrame[ 2 ][ NES_DISP_WIDTH * NES_DISP_HEIGHT ];
in which the pixels are stored like this:

Since Array WorkFrame stores the screen information (256x240) in
16-bit pallet format (5-5-5), it must be transformed and
displayed in the format of the target machine.

into an NSBitmapImageContext using the following:

NSBitmapImageRep *ir = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)WorkFrame
pixelsWide:NES_DISP_WIDTH pixelsHigh:NES_DISP_HEIGHT
bitsPerSample:5 samplesPerPixel:3 hasAlpha:NO isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:NES_DISP_WIDTH*2 bitsPerPixel:16];



All I'm getting is blankness and "Inconsistent set of values to create NSBitmapImageRep"
Any help much appreciated. Thanks.
_______________________________________________
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

_______________________________________________ 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
References: 
 >NSBitmapImageContext from Word * (From: David Kopec <email@hidden>)

  • Prev by Date: Re: Getting true parent window of views in drawers
  • Next by Date: Re: NSBitmapImageContext from Word *
  • Previous by thread: NSBitmapImageContext from Word *
  • Next by thread: Re: NSBitmapImageContext from Word *
  • Index(es):
    • Date
    • Thread