unit Images;

interface
uses
  SysUtils, Graphics, PNGUnit;

function BMPToPNG(const ABMPFileName: TFileName; const APNGFileName: TFileName): boolean;

implementation

function BMPToPNG(const ABMPFileName: TFileName; const APNGFileName: TFileName): boolean;
var b: TBitmap;
begin
  Result := false;
  if not FileExists(ABMPFileName) then
    exit;
  b := TBitmap.Create;
  try
    b.LoadFromFile(ABMPFileName);
    if WriteBitmapToPngFile(APNGFileName, b, clNone) then
      Result := true;//write Image1 to pngtest.png
  finally
    b.Free;
  end;
end;

end.
