AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Animated GIF Problem (beim Erstellen)
Thema durchsuchen
Ansicht
Themen-Optionen

Animated GIF Problem (beim Erstellen)

Ein Thema von spiderb · begonnen am 13. Mär 2008 · letzter Beitrag vom 13. Mär 2008
Antwort Antwort
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.785 Beiträge
 
Delphi 10.4 Sydney
 
#1

Re: Animated GIF Problem (beim Erstellen)

  Alt 13. Mär 2008, 20:38
Guten Abend,

so ich habe die Methode etwas anpassen müssen, da
ich nicht wußte wie Dein Array BitMapArray definiert ist.
Ich habe das jetzt mit einer ImageList gelöst, aber Dein Weg
sollte auch gehen.

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  FrameIndex: Integer;
  Picture: TPicture;
begin
  Screen.Cursor := crHourGlass;
  try
    GifAnimateBegin;
    {Step through each frame in in-memory list}
    for FrameIndex := 0 to BitMapArray.Count -1 do
    begin
      // add frame to animated gif
      BitMapArray.GetBitmap(FrameIndex,Image1.Picture.Bitmap);
      GifAnimateAddImage(Image1.Picture.Graphic,false,1000);
    end;
    // We are using a TPicture but we could have used a TGIFImage instead.
    // By not using TGIFImage directly we do not have to add GIFImage to the uses clause.
    // By using TPicture we only need to add GifAnimate to the uses clause.
    Picture := GifAnimateEndPicture;
    Picture.SaveToFile(ExtractFilePath(ParamStr(0)) + 'sphere.gif'); // save gif
    //ImageMovieFrame.Picture.Assign(Picture); // display gif
    Picture.Free;
  finally
    Screen.Cursor := crDefault;
  end;
end;
Dein Fehlerbild kann ich nicht reproduzieren.

Was ich mir noch vorstellen kann ist,
dass Du gifImage nicht vor FTGifAnimate in den uses geschrieben hast.

Oder stelle mal Deine Deklaration von BitMapArray vor.

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:39 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