Re: using TPad->Print() to create animated GIF

From: Neil Fazel <behzad_at_fnal.gov>
Date: Mon, 20 Jul 2009 09:38:38 -0500


Thanks for the example.

Somebody else pointed out that Mac Preview might not display animated GIF files and suggested I load the file in a browser instead. I tried that, and it worked.

It turns out that I can also open the animated GIF file in Mac Preview, and view the individual pictures using View->Drawer. There is no animation, but all the pictures are listed and one can use the arrow keys to traverse them, i.e. some sort of manual animation.

Neil

On Jul 20, 2009, at 9:15 AM, Olivier Couet wrote:

> See the example:
> $ROOTSYS/tutorials/image/hsumanim.C
>
> From: owner-roottalk_at_root.cern.ch [mailto:owner-
> roottalk_at_root.cern.ch] On Behalf Of Neil Fazel
> Sent: Monday, July 20, 2009 4:13 PM
> To: roottalk_at_root.cern.ch
> Subject: [ROOT] using TPad->Print() to create animated GIF
>
> I've been trying to create an animated GIF file using the Print()
> function of TPad class:
>
> void Print(const char* filename, Option_t* option)
>
> Save Pad contents in a file in one of various formats.
>
> if option = 0 - as "ps"
> <snip>
> "gif" - a GIF file is produced
> "gif+NN" - an animated GIF file is produced, where
> NN is delay in 10ms units
> <snip>
>
>
> I do something like this:
>
> mycanvases->Print("./out/animated.gif+50");
>
> A .gif file is indeed created, but when I view it in Mac Preview, I
> only see the first picture saved, without animation. What am I
> missing here?
>
> Thanks,
> Neil
>
Received on Mon Jul 20 2009 - 16:38:48 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 20 2009 - 17:50:02 CEST