gdmodule max colors

John Hunter jdhunter at ace.bsd.uchicago.edu
Sun Nov 2 13:56:01 EST 2003


GD module has a constant gdMaxColors

>From the web page:
 
    Maximum number of colors in an image; GD will likely change this
    figure in a future version.

Is there any way to increase this number?

In the GD FAQ, there is an entry about missing colors in JPEG images
that reads

  When creating truecolor images, you need to call
  gdImageCreateTrueColor, not gdImageCreate.

but I see no analog of this in gdmodule.

I tried increasing gdMaxColors to 2048 in gd.h of the GD src and
recompiled it and gdmodule.  When I do 

  >>> import gd
  >>> print gd.gdMaxColors
  2048

I get the right answer, but then I get a segfault when I try and
create my image.

I am creating pseudo-color plots in GD and would like to have a larger
color pallet.

Suggestions?

Thanks,
John Hunter 

gdmodule-0.42
gd-2.0.15





More information about the Python-list mailing list