Skip to content

Instantly share code, notes, and snippets.

@has207
Created September 28, 2011 13:35
Show Gist options
  • Save has207/1247945 to your computer and use it in GitHub Desktop.
Save has207/1247945 to your computer and use it in GitHub Desktop.
convert images to fit the kindle
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