Navigation Menu

Skip to content

Commit

Permalink
Fixed issue with creating a resource from png using Image_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
taitomagatsu committed Apr 2, 2020
1 parent e7653a5 commit 5abd2ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system/libraries/Image_lib.php
Expand Up @@ -1474,15 +1474,16 @@ public function image_create_gd($path = '', $image_type = '')
$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;
Expand Down

0 comments on commit 5abd2ae

Please sign in to comment.