[QGIS Commit] r12286 - trunk/qgis/python/plugins/mapserver_export

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Nov 29 10:09:48 EST 2009


Author: gsherman
Date: 2009-11-29 10:09:47 -0500 (Sun, 29 Nov 2009)
New Revision: 12286

Modified:
   trunk/qgis/python/plugins/mapserver_export/mapserverexport.py
   trunk/qgis/python/plugins/mapserver_export/ms_export.py
Log:
Added AGG output format to mapserver export
 Please enter the commit message for your changes.

Modified: trunk/qgis/python/plugins/mapserver_export/mapserverexport.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/mapserverexport.py	2009-11-29 13:14:42 UTC (rev 12285)
+++ trunk/qgis/python/plugins/mapserver_export/mapserverexport.py	2009-11-29 15:09:47 UTC (rev 12286)
@@ -108,7 +108,7 @@
     if settings.contains("/MapserverExport/mapHeight"):
       self.dlg.ui.txtMapHeight.setText(settings.value("/MapserverExport/mapHeight").toString ())
     # MapServer IMAGETYPE's [gif|png|jpeg|wbmp|gtiff|swf|userdefined]
-    self.dlg.ui.cmbMapImageType.addItems(QStringList(["png","gif","jpeg","wbmp","gtiff","swf","userdefined"]))
+    self.dlg.ui.cmbMapImageType.addItems(QStringList(["agg","png","gif","jpeg","wbmp","gtiff","swf","userdefined"]))
     if settings.contains("/MapserverExport/imageType"):
       idx = self.dlg.ui.cmbMapImageType.findText(settings.value("/MapserverExport/imageType").toString ())
       self.dlg.ui.cmbMapImageType.setCurrentIndex(idx)

Modified: trunk/qgis/python/plugins/mapserver_export/ms_export.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/ms_export.py	2009-11-29 13:14:42 UTC (rev 12285)
+++ trunk/qgis/python/plugins/mapserver_export/ms_export.py	2009-11-29 15:09:47 UTC (rev 12286)
@@ -294,11 +294,15 @@
     self.outFile.write("\n")
     self.outFile.write("  OUTPUTFORMAT\n")
     self.outFile.write("    NAME " + self.imageType + "\n")
-    self.outFile.write("    DRIVER 'GD/" + self.imageType.upper() + "'\n")
-    self.outFile.write("    MIMETYPE 'image/" + lower(self.imageType) + "'\n")
-    if self.imageType.lower() != "gif":
-      self.outFile.write("    IMAGEMODE RGBA\n")
-    self.outFile.write("    EXTENSION '" + lower(self.imageType) + "'\n")
+    if self.imageType == 'agg':
+        self.outFile.write("    DRIVER AGG/PNG\n")
+        self.outFile.write("    IMAGEMODE RGB\n")
+    else:
+        self.outFile.write("    DRIVER 'GD/" + self.imageType.upper() + "'\n")
+        self.outFile.write("    MIMETYPE 'image/" + lower(self.imageType) + "'\n")
+        if self.imageType.lower() != "gif":
+          self.outFile.write("    IMAGEMODE RGBA\n")
+        self.outFile.write("    EXTENSION '" + lower(self.imageType) + "'\n")
     self.outFile.write("  END\n")
     
 



More information about the QGIS-commit mailing list