android-signaturepad
android-signaturepad copied to clipboard
getSignatureBitmap() crash
In some cases, calling getSignatureBitmap() crashes, because you forgot to check if getTransparentSignatureBitmap()'s result is null or not. If it gives back null, then Bitmap.create() will crash on having 0 as width and 0 as height.
Hi @kiskunk by any chance you did getSignature data and send signature data to mysql database would you please share with me. email: [email protected]
Hi @kiskunk by any chance you did getSignature data and send signature data to mysql database would you please share with me. email: [email protected]
If I wanted to do a database saving I would put it as a byteArray
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.ic_launcher); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream); //compress to which format you want. byte [] byte_arr = stream.toByteArray(); String image_str = Base64.encodeToString(byte_arr, Base64.DEFAULT);
Thanks, Incase of anything I'll get back to you.
On Thu, Feb 14, 2019, 18:24 kiskunk <[email protected] wrote:
Hi @kiskunk https://github.com/kiskunk by any chance you did getSignature data and send signature data to mysql database would you please share with me. email: [email protected]
If I wanted to do a database saving I would put it as a byteArray Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.ic_launcher); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream); //compress to which format you want. byte [] byte_arr = stream.toByteArray(); String image_str = Base64.encodeToString(byte_arr, Base64.DEFAULT);
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gcacace/android-signaturepad/issues/123#issuecomment-463667900, or mute the thread https://github.com/notifications/unsubscribe-auth/AfDwOrpevWjYlq1e8cVycZceJNOTFfvVks5vNX-0gaJpZM4XZfVJ .