[mapserver-users] Error MsDrawMap Image handling error when using PNG

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Aug 17 07:52:28 PDT 2021


Hi Gerhard,

It seems to be a problem with the LIBPNG library on your server.  Is 
"PNG" listed in the response from the command "gdalinfo --formats" ?

I might also:

- recompile ZLIB

- recompile LIBPNG

(executing 'sudo ldconfig' after each)

- recompile GDAL (point to your external LIBPNG)

- test with 'gdalinfo --formats'

- recompile MapServer

- test your mapfile with a 'shp2img' command


-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2021-08-12 7:15 a.m., Gerhard Völkl wrote:
> Hello,
> 
> when using a png image as symbol I got the error
> 
> Image handling error
> 
> When using a gif image all is fine.
> But I can’t change all 1000 Images to gif.
> 
> What can I do? Whatˋs wrong?
> 
> Here an example Output:
> 
> /usr/lib/cgi-bin/mapserv 
> QUERY_STRING="map=/data/ows/maps/test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=725521.7,5433653.4,726708.5,5434495.5&CRS=EPSG:25832&WIDTH=1048&HEIGHT=317&LAYERS=test&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE"
> 
> libpng error: bad parameters to zlib
> 
> Content-Type: text/xml; charset=UTF-8
> 
> <?xml version='1.0' encoding="UTF-8" standalone="no" ?>
> 
> <ServiceExceptionReport version="1.3.0" 
> xmlns="http://www.opengis.net/ogc" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://www.opengis.net/ogc 
> http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
> 
> <ServiceException>
> 
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'test-layer'.
> 
> </ServiceException>
> 
> </ServiceExceptionReport>
> 
> GDAL: In GDALDestroy - unloading GDAL shared library.
> 
> 
> Thanks
> 
> Best regards Gerhard
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the mapserver-users mailing list