Lazarus Tools lazarus / 8-Other ---------------------------------------------------------------------- icebit · 2009-06-02 13:05 I tried to compile xpm_to_png under lazarus\tools, and got some erros in procedure TransparentCopy. I changed that procedure so i could compile the program, as seen below: procedure TransparentCopy(Dest: TPortableNetworkGraphic; Source: TPixmap; Width, Height: Integer); var   SrcImage, RawImg: TRawImage;   Img, DeviceImg: TLazIntfImage;   ImgHandle, MskHandle: HBitmap;   //   aRect : TRect;   pRect : ^TRect; begin   RawImg.Init;   FillDescription(RawImg.Description, Width, Height);   RawImg.DataSize := Width * Height * SizeOf(TRGBAQuad);   RawImg.Data := AllocMem(RawImg.DataSize);     if Source.MaskHandleAllocated then     MskHandle := Source.MaskHandle   else     MskHandle := 0;   //   aRect := Rect(0, 0, Source.Width, Source.Height);   pRect := @aRect;    //Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle,  Rect(0, 0, Source.Width, Source.Height));   Widgetset.RawImage_FromBitmap(SrcImage, Source.Handle, MskHandle,  pRect); I could not register myself in bugtracker, so i could not provide a patch this time. ---------------------------------------------------------------------- Paul Ishenin · 2009-06-02 13:34 I made this tool long ago to convert old images lazarus had from .xpm format to .png. At that time code worked but later we changed graphics a lot I have fixed compilation in r20349. Please update and test if you need it. ---------------------------------------------------------------------- icebit · 2009-06-02 17:06 Ok. Thx.