Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
CMYK & CGImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CMYK & CGImage



Hi,

I'm having problems creating a CGImage with CMYK data. My application right now creates an imageRef via

	imageRef = CGImageCreate(	width,
					height,
					bitsPerComponent,
					numOfComponents*bitsPerComponent,
					bytesPerRow,
					colorSpace,
					kCGImageAlphaNone,
					dataProvider,
					NULL,
					NO,
					kCGRenderingIntentPerceptual);

with dataProvider providing the CGImage with CMYK data. However, it seems the black component of the CMYK data is not getting used when the app renders the CGImage. Black looks rather grayish there, then. Just like a CMY image would. Having a closer look at the kCGImageAlpha group of constants, I discovered this description in the docs

-- CUT --

kCGImageAlphaNone
There is no alpha channel. If the total size of the pixel is greater than the space required for the number of color components in the color space, the least significant bits are ignored. This value is equivalent to kCGImageAlphaNoneSkipLast.


-- CUT --

So, it seems, the K component is simply ignored. I also tried kCGImageAlphaLast and kCGImageAlphaPremultipliedLast, but they really just interpreted the K as alpha then.

Is there really no way to render CMYK data (and not just CMY) in Quartz?

Any help would be very welcome.

Best regards,
Felix Schwarz
_______________________________________________
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.