mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 07:08:35 +02:00
LCL: fixed TLazReaderDIB.InternalRead
git-svn-id: trunk@34864 -
This commit is contained in:
parent
d90f4b44fe
commit
86616ad9b9
@ -115,7 +115,7 @@ type
|
||||
FRawImage: TRawImage;
|
||||
FLineStarts: PRawImageLineStarts;
|
||||
FMaskLineStarts: PRawImageLineStarts;
|
||||
FMaskSet: Boolean; // Set when atleast one maskpixel is set
|
||||
FMaskSet: Boolean; // Set when at least one maskpixel is set
|
||||
FUpdateCount: integer;
|
||||
fCreateAllDataNeeded: boolean;
|
||||
FGetSetColorFunctionsUpdateNeeded: boolean;
|
||||
@ -259,6 +259,7 @@ type
|
||||
procedure CreateData; virtual;
|
||||
function HasTransparency: boolean; virtual;
|
||||
function HasMask: boolean; virtual;
|
||||
procedure SetDataDescriptionKeepData(const ADescription: TRawImageDescription);
|
||||
public
|
||||
property PixelData: PByte read FRawImage.Data;
|
||||
property MaskData: PByte read FRawImage.Mask;
|
||||
@ -3196,6 +3197,12 @@ begin
|
||||
Result := FMaskSet;
|
||||
end;
|
||||
|
||||
procedure TLazIntfImage.SetDataDescriptionKeepData(
|
||||
const ADescription: TRawImageDescription);
|
||||
begin
|
||||
FRawImage.Description:=ADescription;
|
||||
end;
|
||||
|
||||
constructor TLazIntfImage.Create(AWidth, AHeight: integer);
|
||||
begin
|
||||
Create(AWidth, AHeight, []);
|
||||
@ -5318,7 +5325,10 @@ begin
|
||||
|
||||
// if there is no alpha in real (all alpha values = 0) then update the description
|
||||
if FUpdateDescription and FIgnoreAlpha and (Depth = 32) then
|
||||
FImage.DataDescription.AlphaPrec := 0;
|
||||
begin
|
||||
Desc.AlphaPrec:=0;
|
||||
FImage.SetDataDescriptionKeepData(Desc);
|
||||
end;
|
||||
|
||||
Progress(psEnding, 100, false, Rect(0,0,0,0), '', FContinue);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user