Re: Saving canvas as GIF in batch mode.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Feb 15 2000 - 08:54:02 MET


Hi Gagik,
When running in graphics interactive mode, the gif file is produced
from the pixmap in memory. In batch mode, the pixmap is not created.
However, you can produce an eps file and convert this file to gif.
On Unix systems, you can use the conversion utilities ppmtogif
and pstopnm (on Linux they are in /usr/bin).
Below, you will find an extract from a macro illustrating how to
use these tools:

{
   TCanvas c1("c1","gif in batch",800,600);
   hpx.Draw();
   if (gROOT->IsBatch())  {
      c1->Print("c1.eps");
      gSystem->Exec("pstopnm -ppm -xborder 0 -yborder 0 -portrait
c1.eps");
      gSystem->Exec("ppmtogif c1.eps001.ppm > c1.gif");
   } else {
      c1->Print("c1.gif");
   }
}

Rene Brun

Gagik Gavalian wrote:
> 
> Hi,
> 
> I was wondering if someone could help me to find way to save canvas as
> gif image running root in batch mode.
> 
> Thanks...
> Gagik
> --
> Gagik Gavalian
> Physics Department, DeMeritt Hall
> University of New Hampshire
> Durham NH 03824, USA
> 
> Phone: Office : (603)-862-1685
>        Home   : (603)-868-8090



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET