To access a TBGRABitmap in ASM use a PBGRAPixel pointer:
Var PMyBGRA: PBGRAPixel;..
PMyBGRA := MYBGRAImage.Data; //writes upwards from bottom line.
ASM... mov edi/esi,PMyBGRA... End;
Which is the same as:
Var PMyBGRA: PBGRAPixel;...
PMyBGRA := MYBGRAImage.Scanline[MYBGRAImage.height-1]; //so Delphi compatible.
ASM...mov edi/esi,PMyBGRA...End;
BUT CAUTION -> PMyBGRA := MYBGRAImage.Scanline[0]; //is top line writing upwards so don't write more than the Image.Width!!
To access a TLazIntfImage in ASM use a PByteArray pointer:
Var PMyLazIntf: PByteArray;...
PMyLazIntf := MyIntfImage.GetDataLineStart(0); //top line and writes downwards.
ASM...mov edi/esi,PMyLazIntf...End;
Credit goes to GetMem - and of course the Lazarus Team - Best to all - RWC.
Create TBGRABitmap: http://wiki.freepascal.org/BGRABitmap_tutorial
Create TLazIntfImage: http://wiki.lazarus.freepascal.org/Fast_direct_pixel_access