diff --git a/tools/xpm_to_png/xpm_to_png.lpi b/tools/xpm_to_png/xpm_to_png.lpi index 8e95c75f4a..be734d836b 100644 --- a/tools/xpm_to_png/xpm_to_png.lpi +++ b/tools/xpm_to_png/xpm_to_png.lpi @@ -2,8 +2,11 @@ - + + + + @@ -34,30 +37,31 @@ - - + + - + - + - + + + + + - + - - - diff --git a/tools/xpm_to_png/xpm_to_png.lpr b/tools/xpm_to_png/xpm_to_png.lpr index 814d08edc1..708f7f459f 100644 --- a/tools/xpm_to_png/xpm_to_png.lpr +++ b/tools/xpm_to_png/xpm_to_png.lpr @@ -104,11 +104,12 @@ begin SrcImg.Free; end; -procedure TransparentCopy(Dest, Source: TBitmap; Width, Height: Integer); +procedure TransparentCopy(Dest, Source: TCustomBitmap; Width, Height: Integer); var SrcImage, RawImg: TRawImage; Img, DeviceImg: TLazIntfImage; ImgHandle, MskHandle: HBitmap; + R: TRect; begin RawImg.Init; FillDescription(RawImg.Description, Width, Height); @@ -120,7 +121,8 @@ begin else MskHandle := 0; - Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle, Rect(0, 0, Source.Width, Source.Height)); + R := Rect(0, 0, Source.Width, Source.Height); + Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle, @R); InternalSetImage(RawImg, SrcImage); // force output png with colorformat = 4