Spam: Re: [UMN_MAPSERVER-USERS] Strange imagetype/outputformat behaviour
Dejan Gambin
dejan.gambin at PULA.HR
Sat Jul 14 04:17:44 PDT 2007
Frank,
No the declarations are not nested, I just made a mistake while pasting it
in the message.
I am trying to use a custom outputformat. I set something like:
IMAGETYPE "custom"
OUTPUTFORMAT
NAME "custom"
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
FORMATOPTION INTERLACE=OFF
TRANSPARENT OFF
END
...the resulting display is lower color quality than the first one and the
image size is 53KB. I tried the same without the quotation marks, it is the
same. Then I have tried different combinations using DRIVER "GDAL/PNG",
nothing works...then I tried using IMAGETYPE png without having OUTPUTFORMAT
png defined - the same. But when I replace both and set:
IMAGETYPE png
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
FORMATOPTION INTERLACE=OFF
TRANSPARENT OFF
END
...the resulting display is better color quality and the image size is 303KB
!
So I really don't understand what is happening. I am using MS4W. Mapserv.exe
-v shows:
MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS
SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
DEBUG=MSDEBUG
The problem is that I don't know if the "better display result" is indeed
the best one I can get...
Thanks for any help
regards, dejan
> -----Original Message-----
> From: Frank Warmerdam [mailto:warmerdam at pobox.com]
> Sent: Friday, July 13, 2007 4:50 PM
> To: Gambin Dejan
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Spam: Re: [UMN_MAPSERVER-USERS] Strange
> imagetype/outputformat behaviour
>
> Gambin Dejan wrote:
> > Hi,
> >
> > Maybe someone can explain my imagetype/outputformat behaviour. I am
> > displaying a set of RGB tif rasters. I set:
> >
> > IMAGETYPE png
> > OUTPUTFORMAT
> > NAME png
> > DRIVER "GD/PNG"
> > MIMETYPE "image/png"
> > IMAGEMODE RGB
> > FORMATOPTION INTERLACE=OFF
> > TRANSPARENT OFF
> > OUTPUTFORMAT
> > NAME png8
> > DRIVER "GD/PNG"
> > MIMETYPE "image/png"
> > IMAGEMODE PC256
> > FORMATOPTION INTERLACE=OFF
> > TRANSPARENT OFF
> > END
> > END
>
> Dejan,
>
> I assume you don't really nest outputformat declarations like
> you show above, right?
>
> > The resulting 556x424 png image is 303KB in size.
> > When setting some user
> > defined IMAGETYPE/NAME, for example:
> >
> > IMAGETYPE custom
> > OUTPUTFORMAT
> > NAME custom
> > ...
> > I get a much worse display, and the png file is 53KB in
> size. Is it
> > allowed to set the custom names here?
>
> Yes, it is allowed (in fact encouraged) to use your own
> custom name for custom output format declarations.
>
> > Also, I get the same result with png8 and png IMAGETYPE. I
> don't know
> > why? Maybe I am missing something?
>
> I'm not sure your attempt to override the PNG output format
> really worked. I normally never use a pre-defined output
> format name for a custom output format declaration in a mapfile.
>
> Best regards,
> --
> ---------------------------------------+----------------------
> ----------
> ---------------------------------------+------
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | President OSGeo,
> http://osgeo.org
>
>
More information about the MapServer-users
mailing list