d_i_r_t_y has asked for the wisdom of the Perl Monks concerning the following question:

i am using GD.pm in a soon-to-be released bioinformatics website, which includes a number of dynamically-generated graphical content.

This was all going fine until the following error messages started appearing in my logs -

    gd-png:  fatal libpng error: Invalid number of colors in palette
    gd-png error: setjmp returns error condition
...and my images started showing up as broken links. The error is not trappable (using eval) from within perl, and i don't think i have what it takes to go ferreting through a gazillion lines of graphics library c source.

A thousand thanks for any assistance.

Replies are listed 'Best First'.
RE: anomolous behavious in GD.pm
by coreolyn (Parson) on Aug 16, 2000 at 15:39 UTC

    I can't be positive, but it may be related to the way the gd library was installed. Download both the GD.pm (CPAN) and the GD library from boutell's site. There is a patch file that comes with GD.pm that you must use on a virgin install dir of the GD lib BEFORE you run configure. The patch allows you to run configure jpeg and freestyle enable flags.

    It could also be that you have one of the GD libs that doesn't support GIF's. Support for gif was dropped if I remember correctly.

    The exact info is in the GD.pm README

    coreolyn Duct tape devotee.

      thanks for the reply...

      perhaps i was a little hasty/brief in the inital mail -- i have installed several different versions of GD.pm, libgd, libpng, freetype, and libtiff, all on several different linux kernels (2.0.*, 2.2.*) and distros (debian slink, potato, mandrake 7.0, 7.1), and including the autoconf patching process you mentioned.

      even so, i am stumped. i have even written to lincoln stein, the author of GD, but hey, he's a busy man.

      guess i should try him again...