[Mapbender-commits] r8719 - branches/2.7/http/classes trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Oct 8 06:23:25 PDT 2013


Author: verenadiewald
Date: 2013-10-08 06:23:25 -0700 (Tue, 08 Oct 2013)
New Revision: 8719

Modified:
   branches/2.7/http/classes/class_weldMaps2PNG.php
   trunk/mapbender/http/classes/class_weldMaps2PNG.php
Log:
check if $opacity is empty (needed for old PDF print)

Modified: branches/2.7/http/classes/class_weldMaps2PNG.php
===================================================================
--- branches/2.7/http/classes/class_weldMaps2PNG.php	2013-10-07 21:32:15 UTC (rev 8718)
+++ branches/2.7/http/classes/class_weldMaps2PNG.php	2013-10-08 13:23:25 UTC (rev 8719)
@@ -53,18 +53,22 @@
 			
 			$opacity = $opacities[$i] *100;
 			
-			if($img != false){
-				if ($opacity != 100) {
-				if(imagecolortransparent($img) > -1 ){
-					imagecopymerge($image, $img, 0, 0, 0, 0, $width, $height,$opacity);
-				}else{
-					$this->filter_opacity($img,$opacity);
+			if($img != false) {
+				if ($opacity != 100 && $opacity != "") {
+					if(imagecolortransparent($img) > -1 ){
+						imagecopymerge($image, $img, 0, 0, 0, 0, $width, $height,$opacity);
+					}
+					else {
+						$this->filter_opacity($img,$opacity);
 						imagecopy($image, $img, 0, 0, 0, 0, $width, $height);
 					}
-				} else {
-				imagecopy($image, $img, 0, 0, 0, 0, $width, $height);
+				} 
+				else {
+					imagecopy($image, $img, 0, 0, 0, 0, $width, $height);
 				}
-				@imagedestroy($img); 
+				
+				@imagedestroy($img);
+				 
 			}
 			else{
 				$e = new mb_exception("weldMaps2PNG: unable to load image: " . $url[$i]);

Modified: trunk/mapbender/http/classes/class_weldMaps2PNG.php
===================================================================
--- trunk/mapbender/http/classes/class_weldMaps2PNG.php	2013-10-07 21:32:15 UTC (rev 8718)
+++ trunk/mapbender/http/classes/class_weldMaps2PNG.php	2013-10-08 13:23:25 UTC (rev 8719)
@@ -54,7 +54,7 @@
 			$opacity = $opacities[$i] *100;
 			
 			if($img != false){
-				if ($opacity != 100) {
+				if ($opacity != 100 && $opacity != "") {
 					if(imagecolortransparent($img) > -1 ){
 						imagecopymerge($image, $img, 0, 0, 0, 0, $width, $height,$opacity);
 					} else {



More information about the Mapbender_commits mailing list