Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi WMF nach GIF oder PNG konvertieren (https://www.delphipraxis.net/8037-wmf-nach-gif-oder-png-konvertieren.html)

Mario 27. Aug 2003 12:06


WMF nach GIF oder PNG konvertieren
 
Hallo,

ich erstelle mit meinem Programm WMF-Grafiken. Zum Einbauen in eine Webseite, möchte ich daraus gern Gif oder PNG-Dateien machen, damit der Hintergrund transparant bleibt. Kann mir dafür jemand den Ansatz zeigen?

Mario 28. Aug 2003 07:50

Re: WMF nach GIF oder PNG konvertieren
 
So, ich habe nun die Möglichkeit mittels der GifImage Komponente gefunden:
Delphi-Quellcode:
procedure Convert;
var
  Wmf       : TMetaFile;
  GIF      : TGIFImage;
  Ratio          : Double;
begin
  Wmf := TMetafile.Create;
  try
    Wmf.LoadFromFile('C:\test.wmf');

    GIF := TGIFImage.Create;
    try
      Ratio := Wmf.Width / 400; // Breite in Pixel
      Wmf.Width := Round(Wmf.Width / Ratio);
      Wmf.Height := Round(Wmf.Height / Ratio);

      GIF.Assign(Wmf);
      GIF.SaveToFile('C:\test.gif');

    finally
      GIF.Free;
    end;
  finally
    Wmf.Free;
  end;
end;

sakura 28. Aug 2003 08:32

Re: WMF nach GIF oder PNG konvertieren
 
Hi Mario,

ich möchte Dich ur darauf hinweisen, daß der GIF-Algorhytmus in Deutschland noch bis Mitte nächsten Jahres unter Patentschutz steht und nur lizensiert in eigener Software zum Einsatz kommen darf.

...:cat:...

P.S. Irgendwo im Forum findest Du eine Diskussion um Thema.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz