fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Can't load multiple images in ListView when using ResizeOptions on 0.5.0

Open mrlongtt opened this issue 11 years ago • 8 comments

Hi Fresco, This library is so cool for loading image. But I have an issue when upgrading to 0.5.0 (It's not happen on 0.4.0). I have a ListView which contains items that using Fresco to load Image (like the sample code),the issue is some images can't be loaded on the list. If I removed ResizeOptions, it works fine. It also work fine on 0.4.0. Here's my code:

ImageRequestBuilder builder = ImageRequestBuilder.newBuilderWithSource(uri)
        .setLowestPermittedRequestLevel(ImageRequest.RequestLevel.FULL_FETCH)
        .setAutoRotateEnabled(true);
    if (width != 0 && height != 0) {
      builder.setResizeOptions(new ResizeOptions(width, height));
    }
    DraweeController controller = Fresco.newDraweeControllerBuilder().setImageRequest(builder.build())
        .setAutoPlayAnimations(true)
        .setOldController(draweeView.getController()).build();
    draweeView.setController(controller);

Please help me to troubleshoot the issue. Thanks

mrlongtt avatar May 28 '15 05:05 mrlongtt

@mrlongtt does this happen for local images or images downloaded over the network or both?

TarangS avatar May 29 '15 11:05 TarangS

It only happens for images downloaded over the network

mrlongtt avatar May 30 '15 16:05 mrlongtt

Are these animated images? We don't support resizing them. Only JPEGs can be resized.

tyronen avatar May 31 '15 21:05 tyronen

All of them are Jpegs files.

mrlongtt avatar Jun 03 '15 08:06 mrlongtt

How large are the images? There is an issue for images where either dimension is longer than the OpenGL texture limit (usually either 2048 or 4096).

tyronen avatar Jun 08 '15 00:06 tyronen

They are small images (100x100 and 200x200)

mrlongtt avatar Jun 09 '15 02:06 mrlongtt

I got this issue at well.

rockerhieu avatar Jun 09 '15 02:06 rockerhieu

The improvements made in 0.6.1 should help with this. Also try the new experimental downsampling facility.

tyronen avatar Aug 10 '15 14:08 tyronen