Imagemagick animated gif size optimization

守給你的承諾、 提交于 2020-01-01 09:16:36

问题


I am use this code to resize and save a animated gif (php):

system("convert *originalfile* -resize *size* -coalesce *newfile*); 

Once done the filesize is quite large. Usually larger than the original even! What can I do to reduce the file size?

I used convert $completeMiff -dither none -matte -depth 8 -deconstruct -layers optimizePlus -colors 32 $optimizedFile_16 and the file gets even bigger???


回答1:


Add -layers optimize

system("convert *originalfile* -resize *size* -coalesce -layers optimize *newfile*"); 

That worked well enough for me, when I faced this issue. Looks like there are some more advanced options discussed here as well



来源:https://stackoverflow.com/questions/5508945/imagemagick-animated-gif-size-optimization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!