• 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
[Q] Convert PixMapHandle to NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Convert PixMapHandle to NSBitmapImageRep


  • Subject: [Q] Convert PixMapHandle to NSBitmapImageRep
  • From: Eric Gorr <email@hidden>
  • Date: Tue, 24 Mar 2009 17:48:43 -0400

While I should be able to use:

- (id)initWithBitmapDataPlanes:(unsigned char **)planes pixelsWide: (NSInteger)widthpixelsHigh:(NSInteger)height bitsPerSample: (NSInteger)bps samplesPerPixel:(NSInteger)spphasAlpha:(BOOL)alpha isPlanar:(BOOL)isPlanar colorSpaceName:(NSString *)colorSpaceNamebitmapFormat:(NSBitmapFormat)bitmapFormat bytesPerRow: (NSInteger)rowBytesbitsPerPixel:(NSInteger)pixelBits

and pass in the appropriate values from my PixMapHandle, I was hoping that

PixMapHandle previewPixMap = GetGWorldPixMap( previewGWorld );
LockPixels( previewPixMap );
[NSBitmapImageRep imageRepWithData:[NSData dataWithBytes:*previewPixMap length:GetHandleSize( (Handle)previewPixMap )]];
UnlockPixels( previewPixMap );


would have worked, but it doesn't (wasn't really expecting it to).

Before I went ahead and use the init method, I wanted to find it if there was something simple that I was missing.


_______________________________________________

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: [Q] Convert PixMapHandle to NSBitmapImageRep
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Control over position of tooltip for a NSView
  • Next by Date: Re: Noob question: Weirdness getting the bounds of an NSView...
  • Previous by thread: Re: Control over position of tooltip for a NSView
  • Next by thread: Re: [Q] Convert PixMapHandle to NSBitmapImageRep
  • Index(es):
    • Date
    • Thread