rgb colour values of a jpeg image?
Posted on 2000-05-11
I have a form with a Timage (in Delphi 5) and I loaded it with a jpeg file. I want to know the RGB values for a particular pixel in the jpeg file.
If I load the Timage with a bmp file, I can find the rgb values easily using this code:
L := Form1.Image1.Picture.Bitmap.Canvas.Pixels[x,y];
R := R + ((L shr 16) and $FF);
G := G + ((L shr 8) and $FF);
B := B + (L and $FF);
It does not work with jpeg images. Any suggestion?
thanks in advance,
Manuel López (lopem)