[Mapserver-users] saveImage --> save in 4.0

Simpson, Andrew Andrew.Simpson at ssc.nasa.gov
Tue Aug 12 13:50:42 PDT 2003


Thanks, for the response.  That helps clarify the new functionality.
Is there code to instantiate an outputFormat object and access its
methods/attributes from code without the use of map files?

-----Original Message-----
From: Sean Gillies [mailto:sgillies at frii.com]
Sent: Tuesday, August 12, 2003 3:01 PM
To: Simpson, Andrew
Cc: 'mapserver-users at lists.gis.umn.edu'
Subject: Re: [Mapserver-users] saveImage --> save in 4.0


If output formats are properly defined in your map file (see the
map file reference), you change formats using setImageType().

$map->setImageType('JPEG') 				# JPEG is a built-in
$map->setImageType('JPEG_TRANSPARENT')  # Using a named outputformat
	
# in your map file

outputformat is documented at

http://mapserver.gis.umn.edu/doc40/mapfile-reference.html#outputformat

cheers,
Sean

On Tuesday, August 12, 2003, at 01:25  PM, Simpson, Andrew wrote:

> Hello,
>  
> I've been upgrading perl mapscripts to 4.0 and found the wiki 
> MigrationGuide to be a little confusing.
>  
> After stumbling around in the code I found saveImage() is now save() 
> and one can use $map->setImageType('xxx') to change the image type.
>  
> How does one change the transparent and interlace options?  I see a 
> lot of code dealing with outputFormat, but couldn't get any of the 
> functions to work.
>  
> Thanks,
> Drew.
>
--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies





More information about the MapServer-users mailing list