I want to display image from internet with blur effect.
I configured Fresco:
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
.setDownsampleEnabled(true)
.build();
Fresco.initialize(this, config);
Load and display image:
Postprocessor postProcessor = new BasePostprocessor() {
@Override
public void process(Bitmap bitmap) {
super.process(bitmap);
blurImage(bitmap);
}
};
ImageRequest request = ImageRequestBuilder.newBuilderWithSource(imageUri)
.setPostprocessor(postProcessor)
.build();
PipelineDraweeController controller
= (PipelineDraweeController)Fresco.newDraweeControllerBuilder()
.setImageRequest(request)
.setOldController(simpleDrawee.getController())
.build();
simpleDrawee.setController(controller);
The problem is the bitmap
I got is full resolution bitmap instead of down-sampled bitmap, this make blurImage()
runs too slow.
Please help me to modify the down-sampled bitmap.