0

Can Android-Universal-Image-Loader load bitmaps into memory scaled down, like this: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html ?

Thanks!

I'm loading images like this:

final ImageSize size = new ImageSize(MAX_W, MAX_H);
final DisplayImageOptions options = new DisplayImageOptions.Builder()
    .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
    .build();

ImageLoader.getInstance().loadImage(uri.toString(), size, options, new ImageLoadingListener() { And I have two issues:

  1. The resulting bitmap often has a height or width greater than the max I specified.
  2. I worry it loaded the entire bitmap into memory and just scaled it down, which will fail with large images in low memory scenarios.
4

1 Answer 1

0

Picasso can, and incase it a very large image.

                Picasso.with(getActivity().getBaseContext())
                    .load(new File(picturePath))
                    .resize(300, 400)
                    .placeholder(R.drawable.placeholder)
                    .error(R.drawable.errorimage)
                    .into(imageview);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.