question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.setDownsampleEnabled(true) then resize don't work for webp with at least Android API =17

See original GitHub issue

Hello,

Testing Fresco with .setDownsampleEnabled(true) on one API 17 device, I don’t have the downsample fresco logs (RequestLoggingListener).

With another device, that is API 10, files are well downsampled. I could see the RequestLoggingListener lines.

The API 10 device, with same Fresco settings (downsample and resize to same size) is fastest (about x2 to x4 ) to decode picture that the API 17 one.

API 10 : RequestLoggingListener: time 210302582: onProducerFinishWithSuccess: {requestId: 11, producer: DecodeProducer, elapsedTime: 273 ms, extraMap: {bitmapSize=1600x1067, queueTime=0, imageType=DEFAULT, isFinal=true, hasGoodQuality=true}}

API 17 : RequestLoggingListener: time 89545018: onProducerFinishWithSuccess: {requestId: 52, producer: DecodeProducer, elapsedTime: 928 ms, extraMap: {bitmapSize=1600x1067, queueTime=2, imageType=DEFAULT, isFinal=true, hasGoodQuality=true}}

On API 10, I can find the Downsample log line : DownsampleUtil: Downsample - Specified size: 2048x2048, image size: 1600x1067 ratio: 1.3 x 1.9, ratio: 1.919 for http://domain.tl/picture.jpg

Thus I can’t in API 17.

I have read this (http://frescolib.org/docs/configure-image-pipeline.html#_) and see downsample is experimental, but which Android version are supported, and which are not ?

This have been tested with fresco 0.10.0, 0.11.0. All tested pictures are prefetch to disk and stored there before to be displayed.

Greatings,

Eric

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
eldkcommented, Sep 7, 2016

Hello,

as libwebp 0.5.1 is now merged in Fresco/Master (https://github.com/facebook/fresco/pull/1388).

I deleted all branches, from my repository, with previous libwebp versions.

Branche with downsample enable for webp (to test) is here : https://github.com/eldk/fresco/tree/mDownSample (diff is here : https://github.com/eldk/fresco/commit/8e91c71c7d0aece81a2cbf7381cabe6754e84cca)

1reaction
eldkcommented, Jun 22, 2016

@oprisnik , thanks.

Should you have a look here :

https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/GbntPnwiGTU

that’s not a direct matter but should enhance the use of Fresco and the app user respect on “get what you need, for what you should expect from what your device can do”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

setDownsampleEnabled(true) then resize don't work for webp
Hello,. I think @massimocarli solve it here : 474f62a. So you should use master repository to build Fresco with downsample for webp.
Read more >
How to downsample images correctly? - Stack Overflow
i've tested it and it shows the downsampled images just fine. in the image below, i've shown the original image, and downscaling the...
Read more >
Downsampling PNG with SkCodec (or anything else)
I just wanted to confirm whether or not downsampling a PNG during the decode is supported. I tried a jpg and webp, and...
Read more >
Diff - 409b9c0094..77bf1926a9 - chromium/src - Git at Google
TODO(crbug.com/863068): Set dist:onDemand="true" once we can ... API may be - // called, but this is guaranteed to be the last call, ...
Read more >
frameworks_base - Gitiles - Gerrit Code Review
-3005,6 +3005,9 @@ // The elapsed real time of start of the process. ... for the set disables the restriction so that all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found