LCL: fixed CreateCompatibleBitmaps without mask

git-svn-id: trunk@16826 -
This commit is contained in:
vincents 2008-10-01 10:40:38 +00:00
parent 2d5ba04966
commit 02ef107102

View File

@ -1915,7 +1915,6 @@ function CreateCompatibleBitmaps(const ARawImage: TRawImage; out ABitmap, AMask:
var
Desc: TRawImageDescription absolute ARawimage.Description;
ImgHandle, ImgMaskHandle: HBitmap;
ImagePtr: PRawImage;
DevImage: TRawImage;
DevDesc: TRawImageDescription;
@ -1923,8 +1922,6 @@ var
QueryFlags: TRawImageQueryFlags;
W, H: Integer;
begin
ImgMaskHandle := 0;
W := Desc.Width;
if W < 1 then W := 1;
H := Desc.Height;
@ -1968,12 +1965,7 @@ begin
end;
try
Result := RawImage_CreateBitmaps(ImagePtr^, ImgHandle, ImgMaskHandle, ASkipMask);
if not Result then Exit;
ABitmap := ImgHandle;
if not ASkipMask
then AMask := ImgMaskHandle;
Result := RawImage_CreateBitmaps(ImagePtr^, ABitmap, AMask, ASkipMask);
finally
DstImage.Free;
end;