Re: Data URI and Base64

54 views
Skip to first unread message
Message has been deleted

Lukas Laag

unread,
May 29, 2011, 3:38:09 PM5/29/11
to lib-gw...@googlegroups.com
On 05/29/2011 07:03 PM, ~ paPus ~ wrote:
> Hello Lukas! :)
>
> In case you need an almost-cross-browser implementation of the Base64
> encoding for Data URIs for downloading generated content, I've found
> one that works in the newest Firefox, Chrome and Opera (no IE9). It's
> not a standard, but since browsers use it internally anyway, it is
> probably easier and shorter than including a Base64 library.
>
> The functions:
> https://developer.mozilla.org/En/DOM/Window.btoa
> or the lib:
> http://goo.gl/TjtnB
>
> and a HTML test file if you want to test it in a browser:
> http://pastie.org/1989563
>
> Lőrinc

Hi Lőrinc,
Thanks for the tip. Very useful indeed.
Lukas

Viacheslav Dobromyslov

unread,
Feb 25, 2012, 10:04:06 PM2/25/12
to lib-gw...@googlegroups.com
Hello friends!

I agree with ~paPus~.
There is a good example from nihilogic: http://www.nihilogic.dk/labs/canvas2image/
In GWT I use this function:
    public static native void setWindowHref(String url)/*-{
    $wnd.location.href = url;
}-*/;
Reply all
Reply to author
Forward
0 new messages