Created
May 28, 2016 01:14
-
-
Save alvarow/3f69e457fd82298320d9692c17d018cf to your computer and use it in GitHub Desktop.
Resize and crop images to fit on 1920x1080
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p cropped | |
# parallel --eta convert {} -auto-orient -define jpeg:size=1920x1440 -resize 1920x1440 -crop 1920x1080+0+32 cropped/{} ::: *.JPG | |
for f in *.JPG | |
do | |
echo convert \"$f\" -auto-orient -define jpeg:size=1920x1440 -resize 1920x1440 -crop 1920x1080+0+32 cropped/\"$f\" | |
done | parallel --eta --will-cite | |
echo Cropping Complete! | |
# http://www.fmwconcepts.com/imagemagick/index.php | |
# http://imagemagick.org/discourse-server/viewtopic.php?t=24898 | |
#convert in.png -distort SRT 1,0 -gravity center -crop 1920x1080 +repage out.png | |
# http://www.imagemagick.org/Usage/distorts/#polar | |
#convert worldmap_sm.jpg -virtual-pixel HorizontalTile -background Black -distort Polar 0 polar_arctic.jpg | |
#convert 20150801_152913-crop.JPG -virtual-pixel HorizontalTile -background Black +distort Polar 0 crop5.jpg | |
# Arc | |
# convert 20150801_152913-crop.JPG -virtual-pixel HorizontalTile -background Black +distort Arc 360 crop6.jpg | |
#for f in *[Jj][Pp][Gg]; do convert $f -resize "1920x1080>" _/$f; echo Image $f converted successfully; done | |
#mogrify -monitor -auto-orient -resize 40% *.jpg | |
#mogrify -monitor -auto-orient -resize 40% *.JPG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment