[Mapserver-users] gd-png: fatal libpng error: Invalid number of colors in palette

Puneet Kishor pkishor at geoanalytics.com
Tue Jul 15 11:12:06 EDT 2003


Lowell,

Thanks. I haven't had the opp to try out your suggestion. Of course, I 
have run into another problem... even if I can use your code and get 
the legend to work... making a legend image with the symbols for all 
the layers... it actually defeats the purpose by not allowing me to 
separate the layers and use them as controls as well. But, that is my 
fault... I didn't think this through completely. When I have figured 
out the exact problem, and hopefully, also the solution, I will post it 
to the list. In essence, I want to replicate html legends within 
Mapscript... later on that.

On a different note... what have you thought wrt modifying the 
perl/mapscript docs so we can post examples right next to the items 
documented. Many new mapscript users complain about there not being 
enough examples. Seems like they either don't look at the wiki, or 
perhaps they find the wiki too confusing. Maybe we should consider 
putting the entire perl/mapscript documentation on the wiki, one page 
per object. etc., and making that the canonical docs.

What do you think.

Puneet.


On Monday, June 16, 2003, at 10:25  AM, Lowell Filak wrote:

> Make sure your code is NOT starting a new imageObj to draw on using 
> "new
> mapscript::imageObj()" but rather create it like the following:
> my $legend_img = $class->createLegendIcon($map,$layer,200,100);
> $class->drawLegendIcon($rmap,$layer,150,50,$legend_img,25,25);
> The above works because createLegendIcon adds the map palette to the 
> new
> canvas image whereas:
> my $legend_img = new mapscript::imageObj(200,100);
> does not work because mapscript::imageObj does not add the map palette.
> HTH
> Lowell F.
>
> The following message was sent by "pkishor_98"
> <pkishor at geoanalytics.com> on Sat, 31 May 2003 04:43:51 -0000.
>
>> In my continuing (unsuccessful) adventures with drawLegendIcon, I have
> encountered
>> --
>>
>> gd-png:  fatal libpng error: Invalid number of colors in palette
>> gd-png error: setjmp returns error condition
>>
>> --
>>
>> does anyone have any idea what is going on? btw, other commands (such 
>> as
>> createLegendIcon) work just fine.
>>
>> Mapserver 3.6, perl.
>>
>> Tia,
>>
>> Puneet.
>>
>> _______________________________________________
>> Mapserver-users mailing list
>> Mapserver-users at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>




More information about the mapserver-users mailing list