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

15 lines
357 B
Text
Raw Normal View History

#!/usr/bin/env sh
2021-07-29 00:37:35 -07:00
# YES_ZSH
# YES_BASH
# YES_DASH
2021-07-29 00:37:35 -07:00
2021-07-30 17:57:08 -07:00
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
}
2021-07-29 00:37:35 -07:00
[ -n "${preload+-}" ] || tpad "$@"