Created
September 28, 2011 13:35
-
-
Save has207/1247945 to your computer and use it in GitHub Desktop.
convert images to fit the kindle
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
mkdir -p kindle/ | |
for file in *jpg; do | |
name="kindle/$(echo $file |sed "s/\.jpg\$//").png" | |
convert -trim -fuzz 20% "$file" "${name}" && \ | |
convert "${name}" -adaptive-resize 600x800 -quality 100 -gravity center -extent 600x800^ "${name}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment