title: How to get ImageView image size (Android)
body: <p>i am working on an image gallery app in which i am loading images from internet and i am saving images to Sd Card on button click.</p>
  
  <p>now what i want is i want to get the size of the image that is loaded in ImageView. i want to get image size in KB / Bytes.</p>
  
  <p>i want to use image size to prevent duplicate save and replacing image.</p>
  
  <p>this is my code that i am using to save image: 
  same resolution images get replaced</p>
  
  <pre><code>    int intHeight = fullImageView.getHeight();
          int intWidth = fullImageView.getWidth();
  
  
          String dirname2 = "/Wallpapers/";
  
          File myDir2 = new File(Environment.getExternalStorageDirectory()
                  .getPath() + dirname2);
  
          myDir2.mkdirs();
  
          String fname2 = "image" + intHeight + intWidth +".jpeg";
          File file2 = new File(myDir2, fname2);
  
          if (file2.exists())
              file2.delete();
          try {
              FileOutputStream out = new FileOutputStream(file2);
              bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
              out.flush();
              out.close();
  
          } catch (Exception e) {
              Toast.makeText(_context, "failed", Toast.LENGTH_SHORT).show();
          }
  </code></pre>
  
  <p><strong>Please Note: i am asking about image size in KB or Bytes</strong></p>