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

NSBitmapImageContext from Word *


  • Subject: NSBitmapImageContext from Word *
  • From: David Kopec <email@hidden>
  • Date: Thu, 9 Mar 2006 20:19:44 -0500

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
  • Follow-Ups:
    • Re: NSBitmapImageContext from Word *
      • From: Greg Best <email@hidden>
    • Re: NSBitmapImageContext from Word *
      • From: Greg Best <email@hidden>
  • Prev by Date: Re: Getting true parent window of views in drawers
  • Next by Date: Re: Custom Cell with Image & Text + OutlineView + Bindings Problem
  • Previous by thread: Re: iTMS movie downloads in QTMovieView
  • Next by thread: Re: NSBitmapImageContext from Word *
  • Index(es):
    • Date
    • Thread