Created
October 3, 2012 16:28
-
-
Save cantlin/3828068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
x=`identify -format "%w" $1` | |
y=`identify -format "%h" $1` | |
data=`openssl base64 < $1 | tr -d '\n'` | |
type=`file --mime-type -b $1` | |
echo "display:block; | |
font:0/0 a; | |
color:transparent; | |
width:"$x"px; | |
height:"$y"px; | |
background:url('data:"$type";base64,"$data"');" | pbcopy | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment