QUESTION 1 - Is this the best way for me to find out the average color in LAB colorspace? Since the initial TIFF is already in LAB colorspace, I want to use a method that just averages the colors in LAB -- without jumping through RGB at all. I want to avoid any type of calculations with colorspace conversions.
Code: Select all
// library already initialized, image already loaded from a file
image.colorSpace(LABColorspace); // I guess this might be detected automatically and not needed, once I actually have a 16 bit TIFF LAB file... Right now I only have an 8 bit TIFF RGB file, but that's another post...
image.scale(Geometry(1, 1));
ColorRGB rgb(croppedImage.pixelColor(0, 0));
cout << rgb.red() << rgb.green() << rgb.blue() << endl;
QUESTION 3 - In Photoshop, I've only seen integer values for RGB or LAB. Are decimal values for LAB permissible, and I've just been seeing rounded values in Photoshop?