WPTools V6 and animated GIFS

    • Offizieller Beitrag

    Hi,

    that is not supported due to the sepeartion of data and display. The images are displayed on a virtual "picel of paper" which does not support animation.

    Next release of V6 will implement an enhancement to display images unscaled - this may make it possible to implement an update handler for animated gifs, too.

    But how many are interested in this?

    Julian

  • although this is an old post, but ever since I have have had version 5 way back when, I have also wanted Animated gif's for display, has version 6 implemented this as of yet? I need to download it and find out if its not ill just have to wait... or maybe get a petition going lol just joking.

    Anyway's as i have stated in the past great component you have done a good job with it.

    Scott.

  • I may have found a temporary solution to get the animation to work. What i have done so far is used the component GifImage and have placed a procedure called

    procedure OnGifPaint(Sender: TObject);

    then call TGifImage(Image1.Picture.Graphic).OnPaint := OnGifPaint

    and then WPTextObj := WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);

    in the OnGifPaint procedure just call
    WPTextObj.LoadObjFromGraphic(Image1.Picture.Graphic);

    so it would look something like this...

    public
    { Public declarations }
    procedure OnGifPaint(Sender: TObject);
    end;

    var
    Form1: TForm1;
    WPTextObj: TWPTextObj;
    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    with TOpenDialog.Create(Nil) do
    try
    If Execute then
    Image1.Picture.LoadFromFile(FileName);
    TGifImage(Image1.Picture.Graphic).OnPaint := OnGifPaint
    finally
    free;
    end;
    WPTextObj := WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);
    end;

    procedure TForm1.OnGifPaint(Sender: TObject);
    begin
    WPTextObj.LoadObjFromGraphic(Image1.Picture.Graphic);
    end;


    although this is messy and you would have to create a list or arrays to maintain each object its the best solution i have come up with so far