1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 04:19:03 -08:00
rc/sh/tpad

14 lines
357 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
}
[ -n "${preload+-}" ] || tpad "$@"