pnglib tout simplement ...
uses pngimage;
var
BMP : TBitmap;
PNG : TPNGObject;
begin
PNG := TPNGObject.Create;
try
PNG.LoadFromFile( ... );
BMP := TBitmap.Create;
try
BMP.Assign(PNG);
{ ou }
BMP.Width := PNG.Width;
BMP.Height := PNG.Height;
BMP.PixelFormat := pf24bit;
BMP.Canvas.Draw(0,0,PNG);
BMP.SaveToFile( ... );
finally
BMP.Free;
end;
finally
PNG.Free;
end;
end;