title: MediaStore Image width and height null
body: <p>when I crawl through the MediaStore, there are images where the entry for height and weight is null.</p>
  
  <p>The files exist and I can show them with the image browser.</p>
  
  <pre><code>Cursor mCursor = _context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,null,null,null,MediaStore.Images.Media.DEFAULT_SORT_ORDER);
  if(mCursor != null){
      mCursor.moveToFirst();
      while(!mCursor.isAfterLast()) {
              Log.d("DEBUG","PIC PATH: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.DATA)));
              Log.d("DEBUG","WIDTH: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.WIDTH)));
              Log.d("DEBUG","HEGHT: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.HEIGHT)));
          mCursor.moveToNext();
      }
      mCursor.close();
  }
  </code></pre>
  
  <blockquote>
    <p>09-12 18:17:30.861 13002-13002/com.google.observer D/DEBUG: PIC PATH:
    /storage/emulated/0/Pictures/Instagram/IMG_20160813_221335.jpg</p>
    
    <p>09-12 18:17:30.861 13002-13002/com.google.observer D/DEBUG: WIDTH:
    null</p>
    
    <p>09-12 18:17:30.861 13002-13002/com.google.observer D/DEBUG: HEGHT:
    null</p>
  </blockquote>
  
  <p>The File has the dimensions: 3366*2988 and I can open it in the file browser.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried it with columns (see answer from Pavneet Singh), but same error. The most pictures works, only a few have this problem:</p>
  
  <pre><code>final String[] columns = {MediaStore.Images.Media._ID, MediaStore.Images.Media.DATA, MediaStore.Images.Media.WIDTH, MediaStore.Images.Media.HEIGHT, MediaStore.Images.Media.DISPLAY_NAME, MediaStore.Images.Media.SIZE};
  Cursor mCursor = _context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,columns,null,null,MediaStore.Images.Media.DEFAULT_SORT_ORDER);
  if(mCursor != null){
      mCursor.moveToFirst();
      while(!mCursor.isAfterLast()) {
              Log.d("DEBUG","PIC PATH: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.DATA)));
              Log.d("DEBUG","WIDTH: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.WIDTH)));
              Log.d("DEBUG","HEGHT: " + mCursor.getString(mCursor.getColumnIndex(MediaStore.Images.Media.HEIGHT)));
          mCursor.moveToNext();
      }
      mCursor.close();
  }
  </code></pre>