[mapserver-users] change AGG Driver via mapscript

schroeter at netgis.de schroeter at netgis.de
Thu Apr 17 07:37:59 EDT 2008


Hi,
I solved my problem:
I set a second outputformat in my mapfile:

OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE PC256
  EXTENSION "png"
  TRANSPARENT ON
END

and change it via mapscript with 
$map->selectOutputFormat("image/png");

greetings
Sven

----- Original Message ----- 
From: <schroeter at netgis.de>
To: <mapserver-users at lists.osgeo.org>
Sent: Tuesday, April 15, 2008 2:17 PM
Subject: [mapserver-users] change AGG Driver via mapscript


> Hallo,
> 
> the standard-output-format in my mapfile is AGG_JPEG:
> 
> OUTPUTFORMAT
>   NAME "AGG_JPEG"
>   DRIVER AGG/JPEG
>   IMAGEMODE RGBA
>   FORMATOPTION "QUALITY=88"
> END
> 
> I try to change the outputformat via mapscript to get a transparent 
> 256-color-png:
> 
>   $map->outputformat->set("name", "png");
>   $map->outputformat->set('driver','GD/PNG');
>   $map->outputformat->set('transparent',MS_ON);
> 
> this works fine, but I get a transparent 24 bit png
> 
> if I try to set the imagemode:
> 
> $map->outputformat->set("imagemode", MS_IMAGEMODE_PC256);
> 
> I get no picture but this warning:
> PHP Warning:  [MapServer Error]: msImageCreateAGG(): AGG driver only 
> supports RGB or RGBA pixel models
> 
> how can I disable AGG?
> 
> thanks Sven 
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list