nhatanhit / flashcanvas

Automatically exported from code.google.com/p/flashcanvas
0 stars 0 forks source link

drawImage() does not support data URL #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello.

drawImage() does not support data URL.
Please support it!

Original issue reported on code.google.com by yukoba on 5 Apr 2010 at 7:30

GoogleCodeExporter commented 9 years ago
Though I wonder if that feature is useful, I'll implement it someday.

Original comment by revu...@gmail.com on 6 Apr 2010 at 4:26

GoogleCodeExporter commented 9 years ago
This would be immensely useful to me. It should only be a couple lines of code 
in drawImage(). You'd need the Base64 decoder class, e.g. from here: 
http://dynamicflash.com/goodies/base64/ -- then do something like this:

if (url.substr(0, 5) == "data:") {
    var dataStartIndex:int = url.indexOf(";") + 1;
    loader.loadBytes(Base64.decodeToByteArray(url.substr(dataStartIndex)));
} else {
    // do what you did before
    loader.load(request);
}

Original comment by marcusca...@gmail.com on 10 Jun 2010 at 7:58

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r86.

If you use FlashCanvas Pro, please try this nightly build:
http://flashcanvas.net/archive/FlashCanvasPro-20100620.zip

Original comment by revu...@gmail.com on 20 Jun 2010 at 9:22