I am working on delphi-7. I have set of pixel values(ie to draw scribbles(colored lines) on image),I want to set the pixels by using the DIB raw bits, My codse is as given below,
if ((y>0) and (y<Height) and (x<Width) and (x>0)) then
row := (Width *(Height - y)+x)*3; // (w2*(h2-j)+i)*3;
(L_PUCHAR(integer(drawbits)+row+2))^ := GetRValue(col);
(L_PUCHAR(integer(drawbits)+row+1))^ := GetGValue(col);
(L_PUCHAR(integer(drawbits)+row))^ := GetBValue(col);
drawbits is the raw bits obtained from DIB of 24 bit image.
It is working fine for some 24 bit images. But with Some 24 bit images it is jumping the scribbles(ie it is not drawing to the same position). Even I am stretching to the 24 RGB bits,I am not getting what is the problem. Please give me solution.