mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:39:14 +02:00
fix line ending: DIBs are dword, but CreateBitmap wants word-aligned
git-svn-id: trunk@7557 -
This commit is contained in:
parent
18024f42bd
commit
87292a147f
@ -1643,14 +1643,15 @@ begin
|
|||||||
Desc^.BitsPerPixel := Desc^.Depth;
|
Desc^.BitsPerPixel := Desc^.Depth;
|
||||||
Desc^.LineEnd := rileDWordBoundary;
|
Desc^.LineEnd := rileDWordBoundary;
|
||||||
FillRawImageDescriptionColors(Desc);
|
FillRawImageDescriptionColors(Desc);
|
||||||
Desc^.AlphaShift := 0;
|
Desc^.AlphaPrec := 1;
|
||||||
Desc^.AlphaSeparate := true; // the alpha is stored as separate Mask
|
Desc^.AlphaSeparate := true; // the alpha is stored as separate Mask
|
||||||
// The next values are only valid, if there is a separate alpha mask
|
// The next values are only valid, if there is a separate alpha mask
|
||||||
Desc^.AlphaBitsPerPixel := 1; // bits per alpha mask pixel.
|
Desc^.AlphaBitsPerPixel := 1; // bits per alpha mask pixel.
|
||||||
Desc^.AlphaBitOrder := riboReversedBits;
|
Desc^.AlphaBitOrder := riboReversedBits;
|
||||||
Desc^.AlphaByteOrder := riboLSBFirst;
|
Desc^.AlphaByteOrder := riboLSBFirst;
|
||||||
Desc^.AlphaLineEnd := rileDWordBoundary;
|
// CreateBitmap winapi call wants word-aligned data
|
||||||
Desc^.AlphaPrec := 1;
|
Desc^.AlphaLineEnd := rileWordBoundary;
|
||||||
|
Desc^.AlphaShift := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WidgetSet.GetRawImageFromDevice(SrcDC: HDC; const SrcRect: TRect; var NewRawImage: TRawImage): boolean;
|
function TWin32WidgetSet.GetRawImageFromDevice(SrcDC: HDC; const SrcRect: TRect; var NewRawImage: TRawImage): boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user