Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: Transparentes Gif mit diesem Tutorial erstellen ?

  Alt 20. Aug 2008, 21:51
Hi,

Habe kein TGIFImage installiert, deswegen kann ich dir nicht so aktiv helfen.

Aber versuch doch mal die andere Variante:

Delphi-Quellcode:
var
  GIF: TGIFImage;
  Ext: TGIFGraphicControlExtension;
begin
  GIF := TGIFImage.Create;
  try
    // Convert bitmap to GIF
    GIF.Assign(Bitmap);
 
    // Create an extension to set the transparency flag
    Ext := TGIFGraphicControlExtension.Create(GIF.Images[0]);
    Ext.Transparent := True;
 
    // Set transparent color to lower left pixel color
    Ext.TransparentColorIndex := GIF.Images[0].Pixels[0, GIF.Height-1];
 
    // Do something with the GIF here...
    ...
  finally
    GIF.Free;
  end;
end;
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat