fresco icon indicating copy to clipboard operation
fresco copied to clipboard

image not rounded

Open yassinia opened this issue 11 years ago • 5 comments

Like this one http://q.qlogo.cn/qqapp/1103532285/9E2AD2EE76A75E5DCFF50B2DB2403982/100 ,when I set fresco:roundAsCircle="true" ,it does not work

yassinia avatar May 18 '15 10:05 yassinia

Fresco does not depend on particular format of url, there is no difference whether there is a suffix or not. There are some limitations when corners of the image can be rounded, see here: http://frescolib.org/docs/rounded-corners-and-circles.html#caveats

Can you provided more details about your use case ? Can you provide more xml and code setting the url ?

michalgr avatar May 18 '15 13:05 michalgr

thank you for your answer sincerely my case is like this in the layout xml

<com.facebook.drawee.view.SimpleDraweeView android:id="@+id/item_head" android:layout_width="40dp" android:layout_height="40dp" fresco:placeholderImage="@drawable/user_pic_img" fresco:placeholderImageScaleType="centerCrop" fresco:roundAsCircle="true" />

and I call like this

    Uri uri = Uri.parse(imgUrl);
    DraweeController controller = Fresco.newDraweeControllerBuilder()
            .setUri(uri)
            .setAutoPlayAnimations(true)
            .build();
    img.setController(controller);

When the imgUrl is http://q.qlogo.cn/qqapp/1103532285/80CFBB6E2AFE50F3D8475B52E776FBE6/100 it works OK While the imgUrl is http://q.qlogo.cn/qqapp/1103532285/9E2AD2EE76A75E5DCFF50B2DB2403982/100 it has no circle

I do not know what's the difference between the two , or did I do something wrong ?

yassinia avatar May 18 '15 14:05 yassinia

I don't think this has anything to do with urls. Both of them are nearly identical. Also, I've tested both urls and they are properly rounded on my device and with latest Fresco.

plamenko avatar Jun 12 '15 15:06 plamenko

Also, there are some limitations when it comes to rounding animated images, so please check that your image is not animated, or specify or use OVERLAY_COLOR rounding mode.

plamenko avatar Jun 12 '15 15:06 plamenko

thank you . the issue is modified a few days ago.

yassinia avatar Jun 13 '15 15:06 yassinia