Canvas-Text-Compress-JS icon indicating copy to clipboard operation
Canvas-Text-Compress-JS copied to clipboard

library does nothing on Android Gingerbread (2.3)

Open jokeyrhyme opened this issue 12 years ago • 0 comments

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.

jokeyrhyme avatar Oct 05 '11 01:10 jokeyrhyme