summaryrefslogtreecommitdiffstats
path: root/system/libraries/Image_lib.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-04-06 09:56:17 +0200
committerGitHub <noreply@github.com>2020-04-06 09:56:17 +0200
commit1428072599798395b04a545cfe483707cd2aaaca (patch)
tree14bbc6199ee5875e3626fc3efe062cf21dbfd09f /system/libraries/Image_lib.php
parente7653a5f22b1803b2eb341bcff89b744b0caac03 (diff)
parent5abd2ae8c7fb30585dae2bf96ffa847771ebad7f (diff)
[ci skip] Merge pull request #5938 from taitomagatsu/fix-image-creation-from-png
Fixed issue with creating a resource from png using Image_lib
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r--system/libraries/Image_lib.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 0d9fa4420..0ef76a101 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1474,15 +1474,16 @@ class CI_Image_lib {
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported'));
return FALSE;
}
+
+ return imagecreatefrompng($path);
case 18:
if ( ! function_exists('imagecreatefromwebp'))
{
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_webp_not_supported'));
return FALSE;
}
- return imagecreatefromwebp($path);
- return imagecreatefrompng($path);
+ return imagecreatefromwebp($path);
default:
$this->set_error(array('imglib_unsupported_imagecreate'));
return FALSE;