title: Image isn't creating using the BitmapFactory.decodeByteArray
body: <p>Edit:
  When I save those bytes in the txt file and when I save it as png file , it shows the image, but  it is not working here why...?</p>
  
  <p>I am using this code to create image from byte array
  on doInBackground()</p>
  
  <pre><code>String base64data=StringEscapeUtils.unescapeJava(IOUtils.toString(resp.getEntity().getContent()));
  base64data=base64data.substring(1,base64data.length()-1);
  JSONObject obj=new JSONObject(base64data);
  JSONArray array=obj.getJSONArray("EMRTable");
  JSONObject childobj=array.getJSONObject(0);
  results=childobj.getString("DocumentInternalFormat");
  </code></pre>
  
  <p>and onPostExecute</p>
  
  <pre><code>if(jsondata!=null) {
      receiveData(jsondata);
  }
  </code></pre>
  
  <p>There is no error in the logcat, even there is no exception in it..but the image isn't showing. I have also did like this</p>
  
  <pre><code>String data=(String)object;
  data=data.trim();
  byte[] base64converted=Base64.decode(data,Base64.DEFAULT);          
  
  ImageView image=new ImageView(context);
  image.setImageBitmap(bmp);
  setContentView(image);
  </code></pre>
  
  <p>but the result same image isn't showing but there is no exception or an error, what is the problem...</p>
  
  <p>The commented lines are when I try to store those bytes into text file and when I pull the file, it shows the images with windows default image viewer.</p>