Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Howto determine color space from an Image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Howto determine color space from an Image



Hi all,

I need to find out what color space an images uses. I have not found a good solution for it.

The only thing one could do is something like this;

	CGColorSpaceRef inCS = CGImageGetColorSpace(inImage);
	int num = CGColorSpaceGetNumberOfComponents(inCS);

	if( num == 4 && bitmapInfo & kCGImageAlphaNone) {
		--> CMYK
	} else {
		--> RGB
	}

This is somewhat lame and probably not accurate in all cases. Are there any better options?

Regards

Dominik

_______________________________________________
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.