- Code: Select all
var PixelPointer,StartPointer:PByte
b:byte;
Bmp.Width:=640;
Bmp.Height:=640;
Bmp.PixelFormat:=pf24bit;// Pixel order: RGB RGB RGB ....
StartPointer:=Bmp.ScanLine[0];
PixelPointer := pointer(integer(StartPointer)+10*width+5);//pixel[5,10]
Move(PixelPointer^, b, 1); <<EAccessViolation!!!
But it raised an EAccessViolation exception. Do you know what is the problem? I want to get the RGB value of each pixel inside the image. Anyway, do you know any other way for obtaining the pointer to the image data? Thanks