Image can't be decoded
Hi, I want to use UIL for displaying images from Play Store, url like https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw . But it failed to display with logcat,
E/ImageLoader﹕ Image can't be decoded [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
After I debug into the defineImageSizeAndRotation in ImageDecoder, I found the outheight/outwidth both -1. Please help.
My UIL config,
DisplayImageOptions options = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.icono_app_grande)
.showImageForEmptyUri(R.drawable.icono_app_grande) // resource or drawable
.imageScaleType(ImageScaleType.IN_SAMPLE_INT) // default
.bitmapConfig(Bitmap.Config.RGB_565) // default
.build();
// Create global configuration and initialize ImageLoader with this configuration
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
.memoryCacheExtraOptions(480, 800) // default = device screen dimensions
.discCacheExtraOptions(480, 800, Bitmap.CompressFormat.JPEG, 75, null)
.discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
.defaultDisplayImageOptions(options)
.imageDecoder(new PlayStoreImageDecoder(true))
.writeDebugLogs()
.build();
ImageLoader.getInstance().init(config);
Full UIL log as :
11-01 15:22:52.961 32157-32160/com.onadevice.gfa D/dalvikvm﹕ GC_CONCURRENT freed 1692K, 11% free 17252K/19171K, paused 13ms+14ms, total 69ms
11-01 15:22:53.352 32157-32157/com.onadevice.gfa D/dalvikvm﹕ GC_FOR_ALLOC freed 193K, 11% free 17222K/19171K, paused 36ms, total 36ms
11-01 15:22:53.352 32157-32157/com.onadevice.gfa I/dalvikvm-heap﹕ Grow heap (frag case) to 17.985MB for 1048592-byte allocation
11-01 15:22:53.375 32157-32183/com.onadevice.gfa D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 10% free 18245K/20259K, paused 21ms, total 21ms
11-01 15:22:53.414 32157-32157/com.onadevice.gfa D/dalvikvm﹕ GC_FOR_ALLOC freed 7K, 10% free 18246K/20259K, paused 20ms, total 20ms
11-01 15:22:53.422 32157-32157/com.onadevice.gfa I/dalvikvm-heap﹕ Grow heap (frag case) to 21.985MB for 4194320-byte allocation
11-01 15:22:53.453 32157-32183/com.onadevice.gfa D/dalvikvm﹕ GC_FOR_ALLOC freed 0K, 9% free 22342K/24419K, paused 29ms, total 29ms
11-01 15:22:53.516 32157-32160/com.onadevice.gfa D/dalvikvm﹕ GC_CONCURRENT freed 36K, 9% free 22375K/24419K, paused 13ms+3ms, total 60ms
11-01 15:22:53.547 32157-32205/com.onadevice.gfa D/ImageLoader﹕ Start display image task [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:22:53.547 32157-32205/com.onadevice.gfa D/ImageLoader﹕ Load image from disc cache [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:12.508 32157-32205/com.onadevice.gfa D/skia﹕ --- SkImageDecoder::Factory returned null
11-01 15:23:12.532 32157-32186/com.onadevice.gfa W/GAV2﹕ Thread[GAThread,5,main]: Service unavailable (code=1), will retry.
11-01 15:23:12.563 32157-32186/com.onadevice.gfa I/GAV2﹕ Thread[GAThread,5,main]: No campaign data found.
11-01 15:23:12.594 32157-32205/com.onadevice.gfa D/ImageLoader﹕ Subsample original image (-1x-1) to -1x-1 (scale = 1) [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:12.610 32157-32205/com.onadevice.gfa D/skia﹕ --- SkImageDecoder::Factory returned null
11-01 15:23:12.610 32157-32205/com.onadevice.gfa E/ImageLoader﹕ Image can't be decoded [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:12.610 32157-32205/com.onadevice.gfa D/ImageLoader﹕ Load image from network [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:12.711 32157-32157/com.onadevice.gfa I/Choreographer﹕ Skipped 1164 frames! The application may be doing too much work on its main thread.
11-01 15:23:12.758 32157-32205/com.onadevice.gfa D/libc﹕ Forward DNS query to netd(h=lh3.ggpht.com s=^)
11-01 15:23:13.625 32157-32205/com.onadevice.gfa D/skia﹕ --- SkImageDecoder::Factory returned null
11-01 15:23:13.633 32157-32205/com.onadevice.gfa D/ImageLoader﹕ Subsample original image (-1x-1) to -1x-1 (scale = 1) [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:14.047 32157-32205/com.onadevice.gfa D/skia﹕ --- SkImageDecoder::Factory returned null
11-01 15:23:14.047 32157-32205/com.onadevice.gfa E/ImageLoader﹕ Image can't be decoded [https://lh3.ggpht.com/FGB4woigS1kvx2RQb0xky_FurCmfBRx3E_geYkvRWfpL-zftBUeS6mHajx_Ljdjdrg=h310-rw_480x800]
11-01 15:23:17.555 32157-32244/com.onadevice.gfa W/GAV2﹕ Thread[Service Reconnect,5,main]: Service unavailable (code=1), using local store.
11-01 15:23:17.914 32157-32186/com.onadevice.gfa D/libc﹕ Forward DNS query to netd(h=ssl.google-analytics.com s=^)
11-01 15:23:20.071 32157-32186/com.onadevice.gfa D/libc﹕ Forward DNS query to netd(h=ssl.google-analytics.com s=^)
11-01 15:23:22.305 32157-32186/com.onadevice.gfa D/libc﹕ Forward DNS query to netd(h=ssl.google-analytics.com s=^)
11-01 15:23:24.946 32157-32186/com.onadevice.gfa D/libc﹕ Forward DNS query to netd(h=ssl.google-analytics.com s=^)
PlayStoreImageDecoder is a copy of BasicImageDecoder, no changes
btw, I'm using the 1.8.6 from maven. It works on Genymotion simulator, but not display on device. With Genymotion, the outHeight/outWidth in Options was correct.
If I change the image to use http://a.hiphotos.baidu.com/album/w%3D2048/sign=004abf07503d26972ed30f5d61c3b0fb/023b5bb5c9ea15ce967562c4b7003af33b87b260.jpg, it display without problem.
Seems about the webp decode problem.
有可能是被墙了
Seems about the webp decode problem
Yes, it is. It happens for some images, I can't help you unfortunately.
07-14 14:56:24.244: E/ImageLoader(7761): Image can't be decoded [http://ceramicdirectory.com/public/img/gallery/[email protected]/605x605%20DC/FLAMINGO%20PINK.jpg_180x180]
-in same path this image shown perfect
http://ceramicdirectory.com/public/img/gallery/[email protected]/298x298mm%20FULL%20BODY%20VITRIFIED%20TILES/10.jpg
im also facing this problem when i put some image url .So it was gave same problem"Image can't be decoded"
I am also facing the same issue maybe as I am using it for the first time, it shows image cannot be decoded for every url but right now while adding a decoder its showing this error
