[mapserver-users] 16 bit PNG or 16 bit jpeg output

Ragi Burhum ragi at burhum.com
Wed Jan 18 23:45:04 PST 2012


Hello,

I am trying to output a single band 16bit png (or jpeg) output from a
Mapserver WCS service.

I have tried the following output formats:

OUTPUTFORMAT
    NAME jpeg
    DRIVER "GDAL/JPEG"
    MIMETYPE "image/jpeg"
    IMAGEMODE INT16
    EXTENSION "jpg"
    FORMATOPTION "QUALITY=85"
 END

OUTPUTFORMAT
    NAME GDALPNG
    DRIVER "GDAL/PNG"
    MIMETYPE "image/png"
    IMAGEMODE INT16
    EXTENSION "png"
    FORMATOPTION "FILENAME=result.png"
  END

When I try different IMAGEMODEs, I get the correct results, but for some
reason, INT16 does not work. I looked through the mailing list and I
noticed that this question has been asked before:

http://osgeo-org.1803224.n2.nabble.com/16-Bit-PNG-Output-td6249725.html
http://osgeo-org.1803224.n2.nabble.com/Using-a-16-bit-per-band-PNG-image-td2490088.html

I tried looking for a ticket in Trac, but I had no luck. Am I doing
something wrong? Perhaps I could accomplish this somehow with a custom gdal
driver?

Also, a side question, if I wanted to make sure the replies from my WCS
getcoverage calls were not multipart (I am just interested in the binary
output), is there some mapserver-specific setting I can use to just get
that image as a reply instead of the accompanying xml files?

Thanks!

- Ragi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120118/74ebf130/attachment.htm>


More information about the MapServer-users mailing list