[mapserver-commits] r7924 - in trunk/mapserver: . mapscript/php3

svn at osgeo.org svn at osgeo.org
Tue Sep 23 17:14:56 EDT 2008


Author: Assefa
Date: 2008-09-23 17:14:56 -0400 (Tue, 23 Sep 2008)
New Revision: 7924

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapscript/php3/php_mapscript.c
Log:
PHP paste image should also work with AGG (#2682)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-09-23 17:58:55 UTC (rev 7923)
+++ trunk/mapserver/HISTORY.TXT	2008-09-23 21:14:56 UTC (rev 7924)
@@ -12,6 +12,8 @@
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
 
+ - PHP paste image should also work with AGG (#2682)
+
 - Fixed bug when QUERYMAP hilite color is set and the shape's color in a
   layer is from a data source (#2769)
 

Modified: trunk/mapserver/mapscript/php3/php_mapscript.c
===================================================================
--- trunk/mapserver/mapscript/php3/php_mapscript.c	2008-09-23 17:58:55 UTC (rev 7923)
+++ trunk/mapserver/mapscript/php3/php_mapscript.c	2008-09-23 21:14:56 UTC (rev 7924)
@@ -6359,12 +6359,20 @@
     imgSrc = (imageObj *)_phpms_fetch_handle(pSrcImg, PHPMS_GLOBAL(le_msimg), 
                                              list TSRMLS_CC);
     
-    if( !MS_DRIVER_GD(imgSrc->format) || !MS_DRIVER_GD(imgDst->format))
-    {
-        php3_error(E_ERROR, "PasteImage function should only be used with GD images.");
+    if( (!MS_DRIVER_GD(imgSrc->format) && !MS_DRIVER_AGG(imgSrc->format)) ||  
+ 	(!MS_DRIVER_GD(imgDst->format) && !MS_DRIVER_AGG(imgDst->format))) 
+      {
+        php3_error(E_ERROR, "PasteImage function should only be used with GD or AGG images.");
         RETURN_LONG(-1);
     }
       
+#ifdef USE_AGG
+    if( MS_RENDERER_AGG(imgSrc->format)) 
+      msAlphaAGG2GD(imgSrc); 
+    if( MS_RENDERER_AGG(imgDst->format)) 
+      msAlphaAGG2GD(imgDst); 
+#endif
+
     convert_to_long(pTransparent);
 
     if (nArgs >= 4)



More information about the mapserver-commits mailing list