android-signaturepad icon indicating copy to clipboard operation
android-signaturepad copied to clipboard

getSignatureBitmap() crash

Open alexwyattdev opened this issue 6 years ago • 3 comments

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.

alexwyattdev avatar Oct 12 '18 13:10 alexwyattdev

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]

Ntonsite avatar Feb 14 '19 13:02 Ntonsite

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);

alexwyattdev avatar Feb 14 '19 15:02 alexwyattdev

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 .

Ntonsite avatar Feb 15 '19 08:02 Ntonsite