[mapserver-users] Two questions about WMS and outputformats
Jukka.Rahkonen at mmmtike.fi
Tue Mar 17 07:32:20 EDT 2009
Frank Warmerdam wrote:
> Aihe: Re: [mapserver-users] Two questions about WMS and outputformats
> Rahkonen Jukka wrote:
> > Hi,
> > By default, without having any OUTPUTFORMAT sections in the
> > Mapserver is advertising following imageformats in WMS
> > document:
> > <GetMap>
> > <Format>image/gif</Format>
> > <Format>image/png</Format>
> > <Format>image/png; mode=24bit</Format>
> > <Format>image/jpeg</Format>
> > <Format>image/vnd.wap.wbmp</Format>
> > <Format>image/tiff</Format>
> > <Format>image/svg+xml</Format>
> > Some users have been confused because WMS client builds menu items
> > according to that list, but at least "image/png; mode 24bit" and
> > "image/tiff" do not give any output. What is the reason to include
> > these formats in getCapabilities by default, if they do not work
> > without creating OUTPUTFORMATs in the mapfile first?
> I don't know why image/tiff and image/png; mode=24bit would not work.
> Perhaps you could file a ticket with minimal details to
> reproduce this problem. Please include the mapserv -v string
> in the ticket so I can try to reproduce a similar scenario.
> Assign the ticket directly to me.
I repeated the test in a more controlled way. Image/tiff works, but
image/png; mode=24bit does not work. The other advertised format that
does not work is image/svg xml.
> > Second question is about JPEG outputformat. It works
> through GD with
> > these settings OUTPUTFORMAT
> > NAME "jpeg"
> > MIMETYPE "image/jpeg"
> > DRIVER "GD/JPEG"
> > EXTENSION "jpg"
> > IMAGEMODE RGB
> > END
> > If I change driver to "GDAL/JPEG" I get this error on ms
> errorlog [Mon
> > Mar 16 11:16:05 2009].825000 msSaveImageGDAL(): General
> error message.
> > Failed to create output JPEG file.
> > JPEG driver doesn't support 4 bands. Must be 1 (grey) or 3
> (RGB) bands.
> > What makes GDAL/JPEG driver to believe that I want 4 bands?
> Or is it
> > just best to use DG/JPEG always?
> I'm surprised. This should not occur with IMAGEMODE RGB. I
> would appreciate your also filing a ticket on this issue and
> assigning it to me.
It does occur with the Mapserver versions I was testing (5.2.0, 5.2.1
and 5.3-dev). I am filing two tickets.
More information about the mapserver-users