Convert

Imagemagick Command – Convert

1
2
3
4
5
6
7
8
9
10
## get image info
identify $filename

# resize
## ! can force-cast to the required size
convert -resize 160x80! $infile $outfile

# quality
## compress with quality, generally 60 -80
convert -quality [0-100] $infile $outfile

e.g, resize jpg in current file

1
2
3
4
#!/bin/bash
for file in `ls *.jpg`; do
convert $file -resize 256x160! -quality 30 $file
done
Contents
  1. 1. Imagemagick Command – Convert
    1. 1.1. e.g, resize jpg in current file