Save a very big image size gif file

Hi, I want to save a big image size gif file. This is part of the macro that I used to creat the canvas:

TCanvas *c1 = new TCanvas(“c1”, “c1”,273,126,7000,500);
c1->Range(-50,-2.625,450,23.625);
c1->SetBorderSize(2);
c1->SetFrameFillColor(0);

Then when I tried to save the canvas as a gif file, I got this message:
GIFencode: incorrect image size: 6996 x 472

The real macro is in the attachment.

The created gif file has 0 byte.

Thanks.
ct_Y4dAuCBFF_expanded.C (30.7 KB)

I cannot reproduce this problem.
Please indicate which version of ROOT you use.

Rene

Hi Brun,
I was using 3.05/07 version.
To reproduce the error, please download the macro. Then run it under root prompt. When you click “save as canvas.gif”, the error will show up:

GIFencode: incorrect image size: 6996 x 472
Info in TCanvas::Print: GIF file c1.gif has been created

the gif file c1.gif is invalid.

Thanks.

Weijiang

well, right now, the error message is segmentation violation:

*** Break *** segmentation violation
Root >

As I already said: I cannot reproduce this problem.
It could be that you are running on a device (XTerm or like)
with not enough local memory. In case you run from an Xterminal,
kill applications like Netscape or similar that eat a lot of memory
and run again your Root session.

Rene

The max size of GIF file ROOT creates is 4096 x 4096

You tried 7000 x 500
where 7000 > 4096

Hope this helps, Valeri
:frowning:

[quote=“wjdong”]Hi, I want to save a big image size gif file. This is part of the macro that I used to creat the canvas:

TCanvas *c1 = new TCanvas(“c1”, “c1”,273,126,7000,500);
c1->Range(-50,-2.625,450,23.625);
c1->SetBorderSize(2);
c1->SetFrameFillColor(0);

Then when I tried to save the canvas as a gif file, I got this message:
GIFencode: incorrect image size: 6996 x 472

The real macro is in the attachment.

The created gif file has 0 byte.

Thanks.[/quote]

Hi Valeri,
just curious why 4096x4096?

Thanks. Regards. VO