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

python - Strange behavior using PyQt4's 'pyqtSlot' decorator before another decorator -

c# - UnhandledExceptionMode.ThrowException for AppDomain.UnhandledException -

c# - Process.Kill() returns access denied -