FetchDecodedImage resizes Uri from local file but keeps original size when Uri from Internet
I found a bug on Fresco 0.6.1.
I'm trying to get a bitmap from a file saved in my sd card, but when I fetchDecodedImage from a file the Bitmap is resized and consequently loses too much quality. However, when I try to fetchDecodedImage with a URI from Internet, the Bitmap isn't resized and doesn't lose quality.
Uri.fromFile(file) -> Lose quality Uri.parse("http://...") -> Don't lose quality
Why? I need to fetchDecodedImage with local file without lose quality. My image is .JPG and 1215x717. Example: http://ddragon.leagueoflegends.com/cdn/img/champion/splash/Akali_5.jpg
Difference between Uri's:

Code:
ImagePipeline imagePipeline = Fresco.getImagePipeline();
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(ImageRequest.fromUri(Uri.fromFile(file)), getApplicationContext());
dataSource.subscribe(new BaseBitmapDataSubscriber() {
@Override
protected void onNewResultImpl(@Nullable Bitmap bitmap) {
// update notification big picture here
}
@Override
protected void onFailureImpl(DataSource<CloseableReference<CloseableImage>> dataSource) {}
}, CallerThreadExecutor.getInstance());
Thanks
Thanks for reporting this. Sounds like a bug, we are investigating.
I have the same problem. And I convert the original jpg image to a png file, it seems to be all right. The image is not very big, just 490*870 px.
I have the same issue on fresco 0.7. I find that when loading JPG images with high resolution(such as 1600 * 1200) from local file (uri starts with "file"), the issue happens. Either I converting the image to a png file or loading the same image from contentProvider(uri starts with "content"), fresco works well. I just use the sample app Fresco Uri App.
Having the exactly same issue. Please fix this as soon as possible. :(
Fixed in v0.8.0