iPhone: CMYK Supported Pixel Formats woes

Posted by user219393 on Stack Overflow See other posts from Stack Overflow or by user219393
Published on 2010-03-28T15:18:57Z Indexed on 2010/03/28 15:23 UTC
Read the original article Hit count: 470

Filed under:
|
|

I am trying to create a image sized 1X1 in CMYK color space. as first step I am creating bitmapContext as

CGColorSpaceRef cmykcolorSpace = CGColorSpaceCreateDeviceCMYK();
CGContextRef currentcontext = CGBitmapContextCreate(NULL,
                                                    1,
                                                    1,
                                                    8, //bitsPerComponent
                                                    4, // bytesPerRow
                                                    cmykcolorSpace,
                                                    kCGImageAlphaNone );

No matter what the combination for bitsPerComponent(8,16 or 32) for supported CMYK, there's always same error Unsupported pixel description - 4 components, 8 bits-per-component, 32 bits-per-pixel

Any help is appreicated.

These are the supported pixel formats

32 bpp, 8 bpc, kCGImageAlphaNone
64 bpp, 16 bpc, kCGImageAlphaNone
128 bpp, 32 bpc, kCGImageAlphaNone | kCGBitmapFloatComponents

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cgimage