Hi all,
I have RGB values that I need to convert into CMYK values. I'm using the iPhone SDK to try and do this.
I have tried a couple of things, but cannot either get the values to be anything other than 0 or 1, or the K element is completely wrong (showing up as a negative number).
Any help would be a life saver!
Thanks in advance!
Sorry, code:
float k = MIN(1-red,MIN(1-green,1-blue));
float c = (1-red-k)/(1-k);
float m = (1-green-k)/(1-k);
float y = (1-blue-k)/(1-k);
NSLog(@"%d %d %d %d",c,m,y,k);
With the following values for red, green and blue:
93, 37 and 27 I get the following values back:
0 0 1073741824 1071858897
Thanks