PHPism Blog

Converting everything into PHP code.

ImageMagick Alternative for resizing GIFs.

Dear customers;
In very rare occasions, some GIF photos face problems and show errors while being processed/resized using ImageMagick.
2 weeks ago Mr. Stefan Ruepp has sent us a modification for ImageMagick alternative :Gifsicle
If you have Gifsicle installed on your server and already have problems with ImageMagick you can do this modification to resolve your issue.

inc/functions/main.php - line 1350 replace
$runinbg = "convert ".$file." -coalesce ".$temppic;
$runinbg = "gifsicle --optimize=O3 < ".$file." > ".$temppic;

inc/functions/main.php - line 1353 replace
$runinbg = "convert -size ".$owh." ".$temppic." -resize ".$nwh." ".$output;
$runinbg = "gifsicle --optimize=O3 --resize ".$nwh." < ".$temppic." > ".$output;

All rights goes to Mr. Stefan Ruepp. Thanks very much for the contribution.
Best Regards

Leave a Reply