[mapserver-users] libpng error: image size exceeds user limits in IHDR

Andrea Peri aperi2007 at gmail.com
Tue Oct 23 11:47:11 PDT 2012


Hi,

Perhaps something correlated to the bit of colors ? The GIF is a 256 only
color format.
Instead the png could be to million colors.

I use this :

  IMAGETYPE PNG8
  OUTPUTFORMAT
    NAME "AGGA"
    DRIVER AGG/PNG
    MIMETYPE "image/png"
    IMAGEMODE RGBA    # need RGBA to have the transparent
    EXTENSION "png"
    FORMATOPTION "GAMMA=1.0"
    FORMATOPTION "INTERLACE=true"
    FORMATOPTION "QUANTIZE_DITHER=OFF"
    FORMATOPTION "COMPRESSION=6"  # Compression: 0=no compression, 9=best,
6=default compression
    FORMATOPTION "QUANTIZE_FORCE=ON"
    FORMATOPTION "QUANTIZE_COLORS=256"
   TRANSPARENT ON
  END

The most important thing is that the
    FORMATOPTION "QUANTIZE_COLORS=256"

force the mapserver to give only the 256 better colors.

If the question is on the 256 color or million color perhaps this could
work.

Andrea.

2012/10/23 Alessandro Pasotti <apasotti at gmail.com>

>  hi All,
>
> I'm in big troubles with a wierd error in python mapscript, the log
> reports: libpng error: image size exceeds user limits in IHDR
>
> image size is 256x256... using gif instead of png shows no errors (as
> expected)... any idea?
>
> the very same piece of code run fine on my testing machine, the error
> is only on production server.
>
> Mapserver version is 6.0.3, python 2.5 and the code is basically a
> wrapper to WMS service, the error appears just after
>
> map.OWSDispatch( req )
>
> output format is set to AGGA:
>
> OUTPUTFORMAT
>         NAME 'AGGA'
>         DRIVER AGG/PNG
>         IMAGEMODE RGBA
>    END
>
> the complete call is
>
>
> ?LAYERS=track_1&TRANSPARENT=TRUE&FORMAT=image%2Fpng%3B%20mode%3D24bit&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=0.0,5009377.0857,2504688.54285,7514065.62855&WIDTH=256&HEIGHT=256
>
> It seems like wrong HEIGHT and WIDTH are passed to the raster buffer,
> I've already checked that the map object has the right size after
> OWSDispatch.
>
> Thanks in advance for any help!
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121023/44cdbf6b/attachment.htm>


More information about the MapServer-users mailing list