title: Cannot show in ImageView a picture exported from the gallery
body: <p>I am creating an Android application that needs to store some multimedia files in the internal storage. The user can choose that multimedia files from the picker. Those files must be available even when the user removes them, so they are copied to the internal storage.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>final Bitmap bitm = MediaStore.Images.Media.getBitmap( this.getContentResolver(), uri );
  final int bitmapRawLength = bitm.getAllocationByteCount();
  final ByteBuffer byteBuffer = ByteBuffer.allocate( bitmapRawLength );
  
  bitm.copyPixelsToBuffer( byteBuffer );
  data = byteBuffer.array();
  
  final ByteArrayInputStream in = new ByteArrayInputStream( data );
  db.store( in );
  </code></pre>
  
  <p>So, the bytes composing the image are copied into an average file inside the internal store through an <b>InputStream</b>. Apparently it works, since the file has contents.</p>
  
  <p>Later the image is loaded in an <b>ImageView</b>:</p>
  
  <pre><code>private void loadImage(File imgFile)
  {
      if ( imgFile.exists() ) {
          final Bitmap bitmap = BitmapFactory.decodeFile( mediaFile.getPath() );
  
          this.ivPictureBox.setImageBitmap( bitmap );
      } else {
          this.abortDueToMissingFile( imgFile );
      }
  
      return;
  }
  </code></pre>
  
  <p>Unfortunately, this does not work. When it is time to load that image, the <b>ImageView</b> goes blank, nothing is shown.</p>
  
  <p>Actually, in the log appears the following message:</p>
  
  <pre><code>D/skia: --- Failed to create image decoder with message 'unimplemented'
  </code></pre>
  
  <p>If I use the file explorer in Android Studio and export the image to my computer, then GwenView fails with the message "Failed to load metadata".</p>
  
  <p>How can I correctly store the image, with the complete information, or show it correctly, whatever is easier or feasible?</p>