title: Image not loading in the ImageView from InputStream
body: <p>I'm trying to obtain the images from the contacts ,so the problem is that image in not being showed.I have found the code on <a href="http://developer.android.com/reference/android/provider/ContactsContract.Contacts.Photo.html" rel="nofollow">ContactsContract.Contacts.Photo</a> ,but I'm unable to load id.</p>
  
  <pre><code> public InputStream openPhoto(long contactId) {
          Uri contactUri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, contactId);
          Uri photoUri = Uri.withAppendedPath(contactUri, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
          Cursor cursor = getContentResolver().query(photoUri,
                  new String[] {ContactsContract.Contacts.Photo.PHOTO}, null, null, null);
          if (cursor == null) {
              return null;
          }
          try {
              if (cursor.moveToFirst()) {
                  byte[] data = cursor.getBlob(0);
                  if (data != null) {
                      return new ByteArrayInputStream(data);
                  }
              }
          } finally {
              cursor.close();
          }
          return null;
      }
  
  
  
  
  
  Profile.setImageBitmap(BitmapFactory.decodeStream(openPhoto(322)));
  </code></pre>