I have an image in memory and I want to create a RGB triplet (RGBRGBRGBRGB etc) buffer in memory.
I have the following code:
Code: Select all
Color clr;
img.depth( 8 );
clr = img.pixelColor( 100, 100 );
unsigned short red = clr.redQuantum();
unsigned short green = clr.greenQuantum();
unsigned short blue = clr.blueQuantum();
I have 2 questions:
1) Is there an easy way to get a RGB triplet buffer that represents the image?
2) If not, why are the values I am getting so large? Am I geting the data correctly?
Thanks heaps for your help,
Steve Q.