just like the title of the question, i want to ask how to create a CMYK image when i have a RGB image as a bitmap. I had reads question that generate the CMYK value from RGB value just like this code
public static int[] rgbToCmyk(int red, int green, int blue)
{
int black = Math.min(Math.min(255 - red, 255 - green), 255 - blue);
if (black!=255) {
int cyan = (255-red-black)/(255-black);
int magenta = (255-green-black)/(255-black);
int yellow = (255-blue-black)/(255-black);
return new int[] {cyan,magenta,yellow,black};
} else {
int cyan = 255 - red;
int magenta = 255 - green;
int yellow = 255 - blue;
return new int[] {cyan,magenta,yellow,black};
}
}
but, after i have the CMYK value i still don't understand where to place the value just like Bitmap.setBitmap() on android. as i know the setBitmap function use the RGB value, not CMYK value... there are a way to change the image color type to CMYK in android? I'm a newbie in android, correct me if I wrong..