title: Universal Image Loader get original image size
body: <p>I am using the Android-Universal-Image-Loader library to loading/caching remote images, and have been digging through the source for quite a while trying to find a way to retrieve the original image size (width and height) for my ImageLoadingListener.</p>
  
  <p>The sample code below is just give you an idea of what I'm trying to do.</p>
  
  <pre><code>    protected class ViaImageLoadingListener implements ImageLoadingListener {
      final SelectableImageView selectableImageView ;
  
  
      protected ViaImageLoadingListener(SelectableImageView selectableImageView) {
          this.selectableImageView = selectableImageView;
      }
  
      @Override
      public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
  
              selectableImageView.setImageBitmap(loadedImage);
              // loadedImage.getWeight() will not return the original 
              // dimensions of the image if it has been scaled down
              selectableImageView.setOriginalImageSize(width, height);
              selectableImageView.invalidate();
  
  
      }
  </code></pre>
  
  <p>I have tried extending the ImageDecoder class and the ImageLoader class to find a round-about way to linking the decoder (from which I can get the original image size in the <code>#prepareDecodingOptions</code> method) to my custom ImageLoadingListener. But the configuration object is private and the fields (including the decoder) are inaccessible from subclasses (and feels like an overly hacky way of solving the problem anyways).</p>
  
  <p>Have I overlooked a simple "built-in" way of getting the original image size without losing the benefit of the UIL's scaling/memory management?</p>