this slowpoke moves

Convert GIF to Bitmap

uses GIFImage

//

procedure TForm1.Button1Click(Sender: TObject);
var
  Picture: TPicture;
  Bitmap: TBitmap;
begin
  Picture := TPicture.Create;
  Bitmap := TBitmap.Create;
  if OpenDialog1.Execute then begin
  try
    Picture.LoadFromFile(OpenDialog1.FileName);
    try
      Bitmap.Width := Picture.Width;
      Bitmap.Height := Picture.Height;
      Bitmap.Canvas.Draw(0, 0, Picture.Graphic);
      Bitmap.SaveToFile(OpenDialog1.FileName + '.bmp');
    finally
      Bitmap.Free;
    end;
  finally
    Picture.Free;
  end;
  end;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate