Einzelnen Beitrag anzeigen

spiderb

Registriert seit: 18. Jul 2007
17 Beiträge
 
#1

Animated GIF Problem (beim Erstellen)

  Alt 13. Mär 2008, 18:18
Hallo erstmal
Ich wollte aus mehreren bitmaps ein animiertes gif erstellen mit hilfe von delphi.
Ich habe mir die Animated GIF files unit von http://www.tolderlund.eu/delphi/ runtergeladen aber da bekomme ich immer folgenen Fehler:

http://i32.tinypic.com/331zxqh.jpg
Delphi-Quellcode:
function GifAnimateAddImage(Source: TGraphic; Transparent: Boolean; DelayMS: Word): Integer;
var
  Ext       : TGIFGraphicControlExtension;
  LoopExt: TGIFAppExtNSLoop;

  begin

  // Add the source image to the animation
  Result := GIF.Add(source); <- Da liegt iwi das Problem!
  // Netscape Loop extension must be the first extension in the first frame!
  if (Result = 0) then
  begin
    LoopExt := TGIFAppExtNSLoop.Create(GIF.Images[Result]);
    LoopExt.Loops := 0; // Number of loops (0 = forever)
    GIF.Images[Result].Extensions.Add(LoopExt);
  end;
  // Add Graphic Control Extension
  Ext := TGIFGraphicControlExtension.Create(GIF.Images[Result]);
  Ext.Delay := DelayMS div 10; // 30; // Animation delay (30 = 300 mS)
// if (Result > 0) then
  if (Transparent) then
  begin
    Ext.Transparent := True;
    Ext.TransparentColorIndex := TransparentIndex(GIF.Images[Result]);
  end;
  GIF.Images[Result].Extensions.Add(Ext);
end;
Kann mir jemand helfen?
Danke schonmal.
  Mit Zitat antworten Zitat