this slowpoke moves

Convert Bitmap to GIF

uses GIFImage

procedure ConvertBMP2GIF;
var
  bmp: TBitmap;
  gif: TGIFImage;
begin
  gif := TGifImage.Create;
  try
    bmp := TBitmap.Create;
    try
      bmp.LoadFromFile(OpenDialog1.FileName);
      gif.Assign(bmp);
    finally
      bmp.Free;
    end;
    gif.SaveToFile(OpenDialog1.FileName + '.gif');
  finally
    gif.Free;
  end;
end;
Beispiel :
procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenDialog1.Execute then
  begin
    try
    ConvertBMP2GIF;
    finally
    end;
  end;
end;
Download : GIFImage.pas

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate