how to resize multiple to image Ubuntu/Manjaro

Ubuntu
Terminal:
sudo apt-get install imagemagick

Manjaro
Terminal:
sudo pacaman -S imagemagick

Note: that commands are in your folder

resize mode default
Terminal:
convert *.jpg -resize 500x500 -quality 100 foto.jpg

resize mode force
Terminal:
convert *.jpg -resize 500x500! -quality 100 foto.jpg


Reducing the file size of a very large images, without changing the image dimensions
first create a folder tmp same level to dictory
Terminal:
mkdir ../tmp

resize all elements jpg to directory
Terminal:
for i in *.jpg; do convert "$i" -quality 40  ../tmp/"$i"; done

up a directory and check to diff
Terminal:
du -smh * | sort -h


Fuente:
https://www.imagemagick.org/discourse-server/viewtopic.php?t=21324



0 comentarios :