Skip to content

Instantly share code, notes, and snippets.

@pleabargain
Created October 11, 2018 14:51
Show Gist options
  • Save pleabargain/3e89b26201856d593fe16d1d66d402d0 to your computer and use it in GitHub Desktop.
Save pleabargain/3e89b26201856d593fe16d1d66d402d0 to your computer and use it in GitHub Desktop.
this will write the file name on to the png image
for img in *.png; do
width=$(identify -format %W ${img})
width=$(( ${width} * 9 / 10 ))
convert \
-background '#0008' \
-gravity center \
-fill white \
-size ${width}x100 \
caption:"${img}" \
"${img}" \
+swap \
-gravity south \
-composite \
"${img}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment