android - 通用图像加载器未加载特定链接的图像

标签 android universal-image-loader

我开始使用Universal Image Loader而不是Picasso,以避免图像无法加载的问题。现在它也出现在Universal Image Loader 中。对于相同的唯一图像,这是同样的问题,但对于其他图像则不然。

有问题的图片:

http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4_4.jpg

其他行为正常的图像:

http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4.2_4.jpg

http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4.3_4.jpg

http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4.4_4.jpg

它们的大小相似。关于我的通用图像加载器,设置是这样的:

在应用中:

ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
        .threadPriority(Thread.NORM_PRIORITY - 2)
        .denyCacheImageMultipleSizesInMemory()
        .diskCacheFileNameGenerator(new Md5FileNameGenerator())
        .diskCacheSize(50 * 1024 * 1024) // 50 Mb
        .tasksProcessingOrder(QueueProcessingType.LIFO)
        .build();
// Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config);

Activity 中:

    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.drawable.image_placeholder)
            .showImageForEmptyUri(R.drawable.image_error)
            .showImageOnFail(R.drawable.image_error)
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .considerExifParams(true)
            .build();

    .......

    ImageLoader.getInstance().displayImage(url), image, options);

任何提示将不胜感激。无论如何,我无法摆脱这个问题,无论是毕加索还是通用图像加载器......

我之前与 Picasso 的 StackOverFlow:

Picasso cannot load images for some URL (no special characters)

最佳答案

图像似乎已损坏,因为在 Photoshop 中下载并打开它也会引发错误。您还可以看到图像底部的模糊像素。

尽管据我所知,图像加载失败的另一种情况是加载 CMYK 颜色格式的图像时。 Android 不支持 CMYK,尽管有一些第三方库用于加载 CMYK 图像,但我认为不适合您。我坚信该图像已损坏。

关于android - 通用图像加载器未加载特定链接的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28687832/

相关文章:

android - android中导航 View 中菜单项的动态图标

android - 如何使用存储访问框架android将文件保存到下载文件夹?

android - 如何在android中找到tts.SythensizetoFile已经完成

java - Android获取 View 类型

android - 带有 Android-Universal-Image-Loader 的 Monodroid

android - 如何设置 GLSurfaceView.Renderer 类将对象显示到 surfaceView 或 FrameLayout 中?

android通用图像加载器使用私钥/公钥获取图像

android - 使用 FileProvider 共享缓存图像

android从url加载图片

android - 根据进度取消图像请求 Android - Image loader Volley , Picasso