1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-29 02:17:12 -07:00
rc/sh/tpad

15 lines
362 B
Bash
Executable File

#!/usr/bin/env sh
# YES_ZSH
# YES_BASH
# YES_DASH
tpad() { ### @-
### add a 1px transparent border around an image to prevent twitter from mangling it into a jpg.
### sadly, this trick doesn't work anymore.
for f; do
gm convert -bordercolor "#000000FF" -border 1x1 "$f" "${f%.png}.tt.png"
done
}
[ "${SOURCING:-0}" -gt 0 ] || tpad "$@"