炸蝦碎碎念。

[Notes, GNU/Linux, Open Source, Ruby on Rails, Computer Science, Archlinux]

[Linux] Convert and Resize Images From Command Line Using ImageMagick

1
2
3
4
5
6
7
8
9
# installing
sudo pacman -S imagemagick
# converting from png to jpg
convert image.png image.jpg
#resizing
convert image.png -resize 1024x768 resized.png
convert image.png -resize 1024 resized.png
convert image.png -resize x768 resized.png
convert image.png -resize 1000x200! resized.png

Source

Comments