fix line ending: DIBs are dword, but CreateBitmap wants word-aligned

git-svn-id: trunk@7557 -
This commit is contained in:
micha 2005-08-23 13:30:17 +00:00
parent 18024f42bd
commit 87292a147f

View File

@ -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;