Re: TCanvas::SaveAs

From: Ilka Antcheva <Ilka.Antcheva_at_cern.ch>
Date: Wed, 03 Aug 2005 14:57:58 +0200


Hi Federico,

I downloaded the version 5.02/00 and did tests - everything works fine and the size of saved .gif file
depends on what is drawn in the canvas.

root [0] TCanvas *c1=new TCanvas("c1","c1",1)
root [1] TFile f("hsimple.root")
root [2] hpxpy->Draw()
root [3] c1->SaveAs("canvas.gif")

Info in <TCanvas::Print>: GIF file canvas.gif has been created root [4] .!ls -l canvas.gif
-rw-r--r-- 1 antcheva cg 16623 Aug 3 14:51 canvas.gif root [5] .!~/xv canvas.gif
// I saw the same picture saved in the file

Please check if your settings of ROOTSYS, LD_LIBRARY_PATH are correct.

Cheers, Ilka

federico wrote:

> Hi,
>
> using the development version precompiled for SLC3,
>
> Intel x86 Linux for Redhat RHEL 3 (SLC3) and gcc 3.2.3, version
> 5.02/00
> <ftp://root.cern.ch/root/root_v5.02.00.Linux.slc3.gcc3.2.3.tar.gz>
>
> I've a problem when using
>
> TCanvas *c1=new TCanvas("c1","c1",1)
> c1->SaveAs("canvas.gif")
>
> whatever I put in the canvas I get a file of 1415 bytes, with no
> images inside.
>
> Cheers,
> Federico
>
>
>
Received on Wed Aug 03 2005 - 15:07:15 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET