How to reduce image size after loading from url in android?
<p>I'm getting image from the web when the image size is large i'm getting the following error</p>

<pre><code>java.lang.OutOfMemoryError: bitmap size exceeds VM budget
</code></pre>

<p>My code is as follows i'm loading the image by using the <code>LoadImageFromWebOperatins</code> method.</p>

<pre><code>animation.addFrame(LoadImageFromWebOperations(feed.getItem(i).getImage()), 2500);
animation.addFrame(LoadImageFromWebOperations(feed.getItem(i).getImage1()), 2500); animation.setOneShot(false);

iv.setBackgroundDrawable(animation);
iv.post(new Starter());
private Drawable LoadImageFromWebOperations(String url) {
    try {

        InputStream is = (InputStream) new URL(url).getContent();

        Drawable d = Drawable.createFromStream(is, "src name");
        return d;
    } catch (Exception e) {
        System.out.println("Exc=" + e);
        return null;

    }
}
</code></pre>

<p>In this case how do i solve this error? please provide solution for this.</p>
