2010年9月20日 星期一

在Ubuntu中如何批次修改圖片大小How to batch resize images in Ubuntu?


It seems so easy! You just use the 'convert' command.

First. Practice show the name of images at your directory by using the 'for' command. Open your termial program and key in these command as following:
#for i in `ls`; do echo test_$i; done

Second. use 'convert' to replace 'echo' command.
#for i in `ls`; do convert -resize 800x600 -quality 100 $i resized_$i; done

Also you can use mogrify to batch resize the images
#mogrify -resize 800x600 *.jpg

沒有留言: