如题,项目使用的是Glide图片加载库,图片使用的是jpg格式,发现第一次加载的时候图片背景是白色的没啥问题,后来在点进页面看,就发现图片背景带了点淡绿色背景了,大家有没有遇到这个问题的,希望能分享一下,谢谢大家!
ImageView 代码:
<ImageView
android:id="@+id/product_photo"
android:layout_width="90dp"
android:layout_height="90dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:layout_alignParentLeft="true"/>
问题图片效果:
补充:
这是第一次打开时的样子:
屏幕快照 2016-07-14 14.21.30
这是退出程序后重新打开时的样子:
屏幕快照 2016-07-14 14.23.18
glide caused by excessive compression http://blog.csdn.net/yaphetzhao/article/details/50586991
I cut a lot of pictures in different formats and sizes and tested them one by one. The specific rules are not yet certain. The initial guess is that the picture resolution cannot keep up. This problem occurs when the picture is zoomed and displayed. :
1. During the test, the 2000X1000 picture used did not have the above problems
2. The same 300x200 picture, the 143KB png picture did not have the above problems, but the 56KB png picture had the problem#🎜🎜 #3. Low-quality jpg pictures were wiped out
4. PNG pictures without background color, a perfect win (nonsense)
5. Test part pictures
The first picture: 300X200, 143KB, png
The second picture: 350X300,56KB, png
The third picture: 220X220,44KB, png
The fourth picture: 220X220,11KB, jpg
#🎜🎜 #