from a simple test i did , i noticed that the scanline hasn't a sequential order address with the next scanline, i mean if i take the address of the last pixel in the first scanline and then increment the this address , i'll point to invalide memory location .
now if i want to travels the whole TBitmap without need of getting the address of evry scanline , i mean just get the first address and then increment it to the end of bitmap pixles .
Code:
var
p : ^integer;
begin
p := bmp.ScanLine[0];
Pinteger(integer(p)+(bmp.width + 1) )^ := $FFFF0000; // access violation
image1.Canvas.draw(0,0,bmp);
Bookmarks