• 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
Which color space?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Which color space?


  • Subject: Which color space?
  • From: Simon Raisin <email@hidden>
  • Date: Sat, 29 May 2010 10:09:08 -0400

I would like to create an 8-bit grayscale image but I cannot find a color
space that uses only 1 8-bit value per pixel.  Everything seems to either be
RGB, RGBA, or one color *plus* an alpha channel.

Am I going about this the wrong way?

Thank you in advance,
Simon

    NSBitmapImageRep* outputImageRep = [[NSBitmapImageRep alloc]

                                        initWithBitmapDataPlanes:(unsigned
char **)NULL

                                        pixelsWide:(int)[inputImageRep
pixelsWide]

                                        pixelsHigh:(int)[inputImageRep
pixelsHigh]

                                        bitsPerSample:(int)8

                                        samplesPerPixel:(int)1

                                        hasAlpha:(BOOL)NO

                                        isPlanar:(BOOL)NO

                                        colorSpaceName:(NSString *) ??? ***
???

                                        bytesPerRow:(int)([inputImageRep
pixelsWide] * sizeof(unsigned char))

                                        bitsPerPixel:(int)0];
_______________________________________________

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: Which color space?
      • From: Seth Willits <email@hidden>
    • Re: Which color space?
      • From: Steve Christensen <email@hidden>
  • Prev by Date: kCGLCPSurfaceBackingSize and enterFullScreenMode:withOptions:
  • Next by Date: UIView retain past drawing?
  • Previous by thread: kCGLCPSurfaceBackingSize and enterFullScreenMode:withOptions:
  • Next by thread: Re: Which color space?
  • Index(es):
    • Date
    • Thread