使用imagemagick 调用命令生成gif缩略图

需要两步
用imagemagick生成gif的缩略图不能一步到位,需要两步操作

第一步
convert sinykk.gif -coalesce sinykk_coalesce.gif

第二步

convert sinykk_coalesce.gif -resize "300X300>" sinykk_end.gif

就算要批量处理也很容易了.

说明:

"300X300>" 这个是当GIF图片没有300的长宽将不进行长宽操作

-coalesce
Fully define the look of each frame of an GIF animation sequence, to form a 'film strip' animation.

Overlay each image in an image sequence according to its -dispose meta-data, to reproduce the look of an animation at each point in the animation sequence. All images should be the same size, and are assigned appropriate GIF disposal settings for the animation to continue working as expected as a GIF animation. Such frames are more easily viewed and processed than the highly optimized GIF overlay images.

The animation can be re-optimized after processing using the -layers method 'optimize', though there is no guarantee that the restored GIF animation optimization is better than the original.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值