使用convert对jpg图像压缩和缩放

图像质量压缩

convert -strip -interlace Plane -gaussian-blur 0.01 -quality 60% source.jpg dest.jpg

图像缩放

convert -resize 70% $ccdimgjpg temp.jpg

批量缩放

for timg in `cat imglist`
    do
        simgpath='xinggui_jpg/'$timg
        dimgpath='test/'$timg
        echo $simgpath
        convert -resize 30% $simgpath $dimgpath
 done

猜你喜欢

转载自blog.csdn.net/archord/article/details/81632716