[Lazarus] Byte-Alignment of TBitmap

Marc Weustink marc at dommelstein.nl
Mon Jan 1 20:22:15 CET 2018



On January 1, 2018 8:17:31 PM GMT+01:00, Martok via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>Hi all,
>
>this showed up in the Discussion around 32876 and 30509:
>> LCL Tbitmap supports 1,24 and 32 bit images from what I see.
>
>That is indeed true:
>  luma.PixelFormat:= pf8bit;
>  luma.SetSize(100, 100);
>  // now: luma.RawImage.Description.Depth == 24
>
>That of course means that the alignment for RawImage access (using
>Scanline) is
>wrong, and code ported from Delphi doesn't work at all

Why does than mean that the alignment is wrong? Based on what did you draw that conclusion?


>How is one supposed to do this? Or is that a not implemented feature?

Iirc it is compatible

Marc



More information about the Lazarus mailing list