There are two situations I load images, first, just directly from the internet, and second, load images that are downloaded in the device. And whenever I load, 8~9 out of 10 images are shown, and 1-2 missing. I see that decode returned false, and google'd as hard as I can, but couldn't come up.
- WAIT_FOR_CONCURRENT_GC blocked 22ms
- WAIT_FOR_CONCURRENT_GC blocked 20ms
- GC_FOR_ALLOC freed 718K, 31% free 9948K/14256K, paused 49ms, total 51ms
- D/skia: --- decoder->decode returned falseGC_CONCURRENT freed 1370K, 30% free 10081K/14256K, paused 3ms+2ms, total 33ms
- GC_FOR_ALLOC freed 916K, 30% free 10029K/14256K, paused 66ms, total 67ms
Here's code I use to load through Picasso:
Picasso.with(activity)
.load(path)
.placeholder(R.drawable.thumbnail_placeholder)
.resize(width,height)
.into(imageView);
Any ideas how to solve this issue? I am calling fit()/resize() every time I get the images to load on the screen. Help much appreciated, thanks in advance!
FYI, I test on both machines, emulator and the real device, Samsung Galaxy Tab 3, and works without any problems on emulator, but problems occur on real device.
UPDATE:
It was causing by image's color space, where images that weren't showing up were the ones that were in YMCK color space.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…