Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

resize image linux command line

# first install imagemagick
#check image size
identify -format "%wx%h" image.jpg

# single image 
convert image.jpg -resize 600x400> image.jpg
convert  -resize 20% source.png dest.jpg

# batch resize by percentage
for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done

# batch resize and change format
for i in $( ls *.jpg); do convert -resize 50% $i $i.gif; done
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #resize #image #linux #command #line
ADD COMMENT
Topic
Name
4+4 =