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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to