Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Which color space?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Which color space?



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];

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.