Canvas-Text-Compress-JS
Canvas-Text-Compress-JS copied to clipboard
library does nothing on Android Gingerbread (2.3)
The library malfunctions on Android Gingerbread (2.3).
After some debugging, I have discovered that the call to Canvas.toDataURL() in EncodeString() results in an empty string.
There is a documented bug in the Android Open Source Project here: http://code.google.com/p/android/issues/detail?id=7901
Apparently only Honeycomb (3.x) and up has the fix, all current Android phones are broken: http://www.mikechambers.com/blog/2011/02/01/detecting-canvas-todataurl-support-in-browsers/
There are JavaScript solutions to produce uncompressed PNGs from a bitmap, however that defeats the purpose of this library.
It might be worth detecting broken toDataURL support and disabling the library.