tinybox

Code for file upload software on up.concealed.world.
git clone git://git.concealed.world/tinybox
Log | Files | Refs | README | LICENSE

commit 86fcb79771421deca97491b9683c071aba221250
parent 6c6cee040d01221f07a5574227f4b1170bab7b5d
Author: Nixx <nixx@firemail.cc>
Date:   Thu, 17 Feb 2022 12:16:22 +0000

Skip stripping gifs - it should not be needed, and they break

Diffstat:
Mindex.php | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/index.php b/index.php @@ -40,10 +40,12 @@ if(($tmpfile = $_FILES['upload']['tmp_name'])){ $isimage = getimagesize($tmpfile) ? true : false; if($isimage){ $img = new Imagick(realpath($tmpfile)); - $profile = $img->getImageProfiles("icc", true); - $img->stripImage(); - if(!empty($profile)) $img->profileImage("icc", $profile['icc']); - $img->writeImage($tmpfile); + if($img->getImageFormat() != 'GIF'){ + $profile = $img->getImageProfiles("icc", true); + $img->stripImage(); + if(!empty($profile)) $img->profileImage("icc", $profile['icc']); + $img->writeImage($tmpfile); + } $img->clear(); $img->destroy(); }