Fresco SimpleDraweeView 像素化图像

Fresco SimpleDraweeView pixelated image

SimpleDraweeView 正在从外部存储器加载像素化位图图像。

我正在通过此

将资产文件夹中的图像复制到外部存储
private OutputStream copy(InputStream in, OutputStream out) throws IOException{
    // Transfer bytes from in to out
    byte[] buf = new byte[in.available()];
    int len;
    while ((len = in.read(buf)) > 0) {
        out.write(buf, 0, len);
    }
    in.close();
    out.close();
    return out;
}

然后我通过这个设置SimpleDraweeView的图片

Fresco.getImagePipeline().evictFromMemoryCache(uri);
    Fresco.getImagePipelineFactory().getMainDiskStorageCache().remove(new SimpleCacheKey(uri.toString()));
    Fresco.getImagePipelineFactory().getSmallImageDiskStorageCache().remove(new SimpleCacheKey(uri.toString()));

    Postprocessor postprocessor = new BasePostprocessor() {
        @Override
        public void process(Bitmap bitmap) {

            });
        }
    };

    ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri)
            .setPostprocessor(postprocessor)
            .build();

    PipelineDraweeController controller = (PipelineDraweeController)
            Fresco.newDraweeControllerBuilder()
                    .setImageRequest(request)
                    .setOldController(header.getController())
                    .build();

    header.setController(controller);

这是一个已知错误。它已在 Fresco 0.9.0 中修复。如果您仍然遇到此问题,请重试并打开一个新的 GitHub 问题。