title: how to check image size less then 100kb android
body: <p>I am trying to get image from gallery and setting up it on <code>ImageView</code> , Hear is okay well i get and set image on <code>ImageView</code>, but now i want to check image size of selected image in <code>kb</code> so i set the validaion for image uploading.
  Please anyone can suggest me how to check selected image size less then <code>100kb</code> or not?, 
  Hear is my code for image selecting and setting it.</p>
  
  <p>Choosing Image useing <code>Intent</code></p>
  
  <pre><code> Intent iv = new Intent(
                      Intent.ACTION_PICK,
                      android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
  
              startActivityForResult(iv, RESULT_LOAD_IMAGE);
  </code></pre>
  
  <p>and get Image Result code ..</p>
  
  <pre><code>    @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      if (requestCode == RESULT_LOAD_IMAGE &amp;&amp; resultCode == RESULT_OK &amp;&amp; null != data) {
          Uri selectedImage = data.getData();
          String[] filePathColumn = { MediaStore.Images.Media.DATA };
  
          Cursor cursor = getContentResolver().query(selectedImage,
                  filePathColumn, null, null, null);
          cursor.moveToFirst();
  
          int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
          picturePath = cursor.getString(columnIndex);
          cursor.close();
          Bitmap bmp=BitmapFactory.decodeFile(picturePath);
  
          ivLogo.setImageBitmap(bmp);
              uploadNewPic();
      }
  }
  </code></pre>