pull a bunch of small fixes from #659

This commit is contained in:
Shish
2019-06-14 13:16:58 +01:00
parent 5765978afd
commit f078b283bd
13 changed files with 61 additions and 61 deletions

View File

@ -155,12 +155,9 @@ class RotateImage extends Extension
/* Attempt to load the image */
switch ($info[2]) {
case IMAGETYPE_GIF: $image = imagecreatefromgif($image_filename); break;
case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($image_filename); break;
case IMAGETYPE_PNG: $image = imagecreatefrompng($image_filename); break;
default:
throw new ImageRotateException("Unsupported image type or ");
$image = imagecreatefromstring(file_get_contents($image_filename));
if ($image == false) {
throw new ImageRotateException("Could not load image: ".$image_filename);
}
/* Rotate and resample the image */