Hi,
I look about GetDataLineStart() and I would like use Move to copy fast a picture to another picture.
All picture is TBitmap 24 bits per pixel color.
When I use a code like below :
type
TRGBArray = array[word] of TRGBTriple ;
pRGBArray = ^TRGBArray ;
procedure ....
var
// Source image
lSrc : TLazIntfImage ;
// Destination image
lDst : TLazIntfImage ;
// Source line
lSrcLine : pRGBArray ;
// Destination line
lDstLine : pRGBArray ;
begin
// PixelFormat := pf24bit
// For each line of source
for lLineIndex := 0 to lSrc.Height - 1 do
begin
lSrcLine := lSrc.GetDataLineStart(lLineIndex) ;
lDstLine := lDst.GetDataLineStart(lLineIndex) ;
Move(lSrcLine, lDstLine, lSrc.Width * 3) ; // * 3 -> for 24 bits
end ;
end ;
First time (lLineIndex = 0) is ok, but the second time (lLineIndex = 1), I receive a SIGSEGV on first GetDataLineStart().
Ok, it doesn't work. But I just want understand why.
It's two pointer on differents memories.
Someone can explain me ?
Thanks you.