From b23b8fc9aa468021d1260c12696b2b48e6c8a90b Mon Sep 17 00:00:00 2001 From: Дмитрий Date: Mon, 20 Oct 2014 00:36:55 +0400 Subject: We can preserve transparency for PNG images --- system/libraries/Image_lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 39753705b..1577887c2 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1201,6 +1201,13 @@ class CI_Image_lib { imagecopymerge($src_img, $wm_img, $x_axis, $y_axis, 0, 0, $wm_width, $wm_height, $this->wm_opacity); } + // We can preserve transparency for PNG images + if ($this->image_type === 3) + { + imagealphablending($src_img, FALSE); + imagesavealpha($src_img, TRUE); + } + // Output the image if ($this->dynamic_output === TRUE) { @@ -1785,4 +1792,4 @@ class CI_Image_lib { } /* End of file Image_lib.php */ -/* Location: ./system/libraries/Image_lib.php */ \ No newline at end of file +/* Location: ./system/libraries/Image_lib.php */ -- cgit v1.2.3-24-g4f1b From fe9309d22c1b088f5363954d6dac013c8c955894 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Jan 2015 17:48:58 +0200 Subject: Bulk (mostly documentation) update - Remove PHP version from license notices - Bump year number in copyright notices - Recommend PHP 5.4 or newer to be used - Tell Travis-CI to test on PHP 5.3.0 instead of the latest 5.3 version Related: #3450 --- system/libraries/Image_lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index c9fd558bc..a70a7bb6f 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -2,11 +2,11 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.2.4 or newer + * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014, British Columbia Institute of Technology + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From db037dbd023aeeae6d8643707945882f962b2a44 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Jan 2015 13:45:12 +0200 Subject: [ci skip] Polish changes from PR #3278 --- system/libraries/Image_lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index d653b1640..529532e60 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1212,7 +1212,7 @@ class CI_Image_lib { imagecopymerge($src_img, $wm_img, $x_axis, $y_axis, 0, 0, $wm_width, $wm_height, $this->wm_opacity); } - // We can preserve transparency for PNG images + // We can preserve transparency for PNG images if ($this->image_type === 3) { imagealphablending($src_img, FALSE); @@ -1803,4 +1803,4 @@ class CI_Image_lib { } /* End of file Image_lib.php */ -/* Location: ./system/libraries/Image_lib.php */ +/* Location: ./system/libraries/Image_lib.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b