[Chameleon] Setting quality for JPEG output

Tyler Mitchell tylermitchell at shaw.ca
Sat Jul 9 01:00:19 EDT 2005


Hi Jason,
In traditional MapServer applications, I've done it several using the method you mentioned.  Are you saying that Chameleon actually checks the IMAGETYPE from the map file?  I don't think so.  It ignores it on mine and relies on the config/chameleon.xml image_type setting which is used at map drawing time in the drawmap.php scripts.  As far as I can tell, the only valid values for that setting are specific formats that GD supports and not related to the map settings for IMAGETYPE.  My question is really how to specify a quality setting for the image_type that Chameleon uses, not how to set it in the map file.  If that makes any sense...

Am I'm going mad or is this tricky for everyone else too?

Tyler

----- Original Message -----
From: Jason Grimes <jgrimes at gi.alaska.edu>
Date: Friday, July 8, 2005 3:40 pm
Subject: Re: [Chameleon] Setting quality for JPEG output

> Hi Tyler,
> 
> You set this with FORMATOPTION in the OUTPUTFORMAT block of your map
> file.  Here is what I have mine set to...
> 
>        IMAGETYPE jpeg
>        IMAGECOLOR 255 255 255
>                                                  
>        OUTPUTFORMAT
>                NAME jpeg
>                DRIVER "GD/JPEG"
>                MIMETYPE "image/jpeg"
>                IMAGEMODE RGB
>                EXTENSION "jpg"
>                FORMATOPTION "QUALITY=100"
>        END
> 
> The IMAGETYPE must match the NAME in OUTPUTFORMAT.
> 
> Jason G
> 
> On Fri, 2005-07-08 at 11:20, Tyler Mitchell wrote:
> > Jacob,
> > I just discovered your drawmap mods for setting imagetype based 
> on layer 
> > metadata -- very good!
> > http://lists.maptools.org/pipermail/chameleon/2004-
> August/001253.html> It is just what I have been needing.
> > 
> > Does anyone know if I can set the compression/quality for JPEG 
> output? 
> > I know how I'd do it in a map file, but $szImgType in 
> drawmap.php seems 
> > to only refer to image format, not sub-settings for that format.
> > 
> > Can anyone give me some pointers?
> > 
> > Tyler
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list