Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed with jsignature formats in Android #15

Open
soniaalves opened this issue Dec 13, 2012 · 1 comment
Open

Help needed with jsignature formats in Android #15

soniaalves opened this issue Dec 13, 2012 · 1 comment

Comments

@soniaalves
Copy link

Hi,

I have this issue with Android:

I have a signature and I need to save it to database. I'm using format data:image/svg+xml;base64 and I save the signature with success!
My goal is, try to load the saved signature to an image control. Something like img.src="data:image/svg+xml;base64,xxxxxxxx......"
I can load the signature to an image, with this format, with success in various platforms.
But when I try the same on Android the signature is not loading in this format.

So my question is: is there a way to convert from data:image/svg+xml;base64 to data:image/png?

Thank you

@dvdotsenko
Copy link

Have other data-url-encoded strings worked with Android's image control? Does it accept data-url-encoded PNGs?

Try to unpack the raw svg source from the data-url-encoded string and feed that instead to the image control. Frankly I would be surprised if the image control supports even unpacked, raw SVG.

Quick google search reveals that viewing/rendering SVG-to-bitmap on Android is a bit of a chore:

http://stackoverflow.com/questions/4517388/svg-processing-under-java-on-android-and-desktop/4644781#4644781

https://answers.launchpad.net/libsvg-android/+question/115135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants