[Pkg-owncloud-commits] [owncloud] 47/61: extract transparency fix from #8050

David Prévot taffit at moszumanska.debian.org
Thu Jul 31 03:51:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit f68fa072c7f63b15268f1166c81704aaf0a4e8a8
Author: Georg Ehrke <developer at georgehrke.com>
Date:   Wed Jul 30 12:16:03 2014 +0200

    extract transparency fix from #8050
---
 lib/private/image.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/private/image.php b/lib/private/image.php
index 5331c39..0dff8c5 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -870,6 +870,14 @@ class OC_Image {
 			imagedestroy($process);
 			return false;
 		}
+
+		// preserve transparency
+		if($this->imageType == IMAGETYPE_GIF or $this->imageType == IMAGETYPE_PNG) {
+			imagecolortransparent($process, imagecolorallocatealpha($process, 0, 0, 0, 127));
+			imagealphablending($process, false);
+			imagesavealpha($process, true);
+		}
+
 		imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h);
 		if ($process == false) {
 			OC_Log::write('core', __METHOD__.'(): Error resampling process image '.$w.'x'.$h, OC_Log::ERROR);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list