Skip to content

Instantly share code, notes, and snippets.

@AlexElvers
Created November 25, 2016 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexElvers/9b51e9ed6516db30c5f00c225920a370 to your computer and use it in GitHub Desktop.
Save AlexElvers/9b51e9ed6516db30c5f00c225920a370 to your computer and use it in GitHub Desktop.
Make the top left pixel slightly transparent so that Twitter does not convert it into ugly JPEG
twittersafepng() {
outfile="${1/.png}_twittersafe.png"
convert "$1" -alpha on -fill '#000000fe' -draw 'matte 0,0 point' "$outfile"
echo "written to $outfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment