"more than 256 colors" error upon printing canvs a

The macro I attached to this help request creates a canvas, divides it into pads, and draws two dimensional histograms with the “colz” option in each pad. At the end I try to print the canvas as a GIF file, which fails with the error message:

Error in <TGX11TTF::WriteGIF>: can not create GIF of image containing more than 256 colors

How can I avoid this error and create the GIF file I need? Please don’t tell me to use another graphics format first and use external tools to convert into GIF, there are reasons why this won’t work for me.
I did some research by myself and found that everything works fine if I only reduce the number of pads. My theory is, that every single pad/histogram uses a color table of its own, so that there are indeed more than 256 colors in the whole image. Is this true and is there any way I can restrain all pads/histograms to use the same colors?

Thanks in advance for your help, Jörn.
make_gif.C (612 KB)

I do not get a such error message with the ROOT version 4.03/03 on linux.
Can you tell me which ROOT version you are using ?

I am using 3.05/05 on linux RedHat9 and 4.00/08 on linux RedHat Enterprise 3.
I get the same error message on both systems.

Still having the problem…

I upgraded to ROOT version 4.02/00 today. Yet I get the same error massage and I cannot create the GIF file.

I couldn’t find version 4.03/03 you refer to, 4.03/02 seems to be the latest one available for the larger public.