2

I'm investigating how to download an image from an url avoiding memory crashes. I've checked that link (is for load a image specifying the desired size) Strange out of memory issue while loading an image to a Bitmap object My question is: Adapting the method for getting the bitmap from an url rather than a file.

How would impact that in it into the device data consumption? Does the application download the image twice? one when inJustDecodeBounds and other for the "real" decode?

Thanks in advance

Community
  • 1
  • 1
yonryl
  • 21
  • 3

1 Answers1

3

The first "pass" will just download small part of the image - header, from which it will read the dimensions. The real decode will download entire image.

So no, to answer your question, it doesn't download the whole image twice.

Axarydax
  • 16,353
  • 21
  • 92
  • 151