Re: problems creating gifs in a macro

Rene Brun (Rene.Brun@cern.ch)
Thu, 1 Jul 1999 23:02:47 +0200 (METDST)


Hi Judith,
Just before canvas.SaveAs
add the following line
canvas.Update();

This should in principle be done automatically by SaveAs.
I will add the feature.

Rene Brun

On Thu, 1 Jul 1999, Judith Katzy wrote:

>
>
> hi rooters,
>
> I tried to save histograms as .gifs. If I run the following macro,
> the test.gif file is created, but empty:
>
> {
> TCanvas canvas("test","test",10,10,600,700);
> TH1F hh("histogram","histogram",100,0.,99.);
> hh.Draw();
> canvas.SaveAs("test.gif");
> }
>
> if I execute 'canvas.SaveAs("test.gif");' directly from the cint command
> line it does work without problems.
>
> I'm working with root version 2.21/08 on RedHat Linux 5.2 .
>
> thanks for help,
> Judith
>