how to convert base64 string image to blob in android? -


I have a base 64 string image. I want to convert it to blob type and save it to the database .. I have

  string base64Image = "iVBORw0KGgoAAAANSUhEUgAAAGAAAACgCAYAAADzcGmMAAAACSV ...";  

This is what I have tried.

  byte [] byteImage = org.apache.commons.codec.binary.Base64.decodeBase64 (befImage. GetBytes ()); Json.put ("during_unloading_photo", byte image);  

Where JSON is the name of my JSONObject and during_unloading_photo column which is the Blob type. To save Blob in

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -