[Sugar-devel] [PATCH Browse] Error page SL #3500

James Cameron quozl at laptop.org
Wed Sep 19 07:14:34 EDT 2012


On Wed, Sep 19, 2012 at 07:54:01AM -0300, Manuel Kaufmann wrote:
> On Tue, Sep 18, 2012 at 10:58 PM, James Cameron <quozl at laptop.org> wrote:
> > Neat.  What method did you use to convert the image?
> 
> Python... It is my best friend :)
> 
> >>> import base64
> >>> base64.b64encode(open('browse-logo.png', 'r').read())
> 
> See you,

Thanks.  In the end I used bash and the base64 program from debian coreutils.

echo "<a href=\"$1\">$1</a> <a href=\"$1.hex\">(hex)</a><p><img src=\"data:image/png;base64,$(base64 $1.png)\"><p>" >> index.html


-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list