Low quality Jpg output

blaise bpicinbono at WORLDONLINE.FR
Sat Mar 19 17:38:55 EST 2005


Le samedi 19 Mars 2005 19:24, Frank Warmerdam a écrit :
> On Sat, 19 Mar 2005 10:05:19 -0800, Jon Saints <saintsjd at yahoo.com> wrote:
> > I have a large number of high color aerial photos in
> > jpg format.  The images display correctly in using a
> > tile index, but are of very low number of colors when
> > rendered through mapserver.
> >
> > mapserv -v gives:
> > MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG
> > OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
> > SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=FASTCGI
> > INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> Jon,
>
> Likely what you want to do is select JPEG as the output format
> instead of 8bit png or gif.  Likely you can just add the
> IMAGETYPE JPEG declaration in your map section.

It's maybe no fully related to your color problem, but it might be usefull to 
you : in your mapfile, with :
IMAGETYPE jpeg
you can play with the
FORMATOPTION [option]
parameter. Have a look in the mapfile doc :
"Provides a driver or format specific option. Zero or more FORMATOPTION 
statement may be present within a OUTPUTFORMAT declaration. (optional)
GD/JPEG: The "QUALITY=n" option may be used to set the quality of jpeg 
produced (value from 0-100). "

If you want best quality, choose 100, but if you have some low speed 
connection clients, you can allow them to switch to a mapfile with 
quality=50, or even 1. (What is default value, btw ?) Of course, less 
quality, but with a basic 56K modem, it changes dramaticaly the images 
download time, especially if you serve large images.
Blaise



More information about the mapserver-users mailing list