fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Caching post-processed images

Open REWKyleB opened this issue 11 years ago • 6 comments

Is it possible to process the image before it is cached and cache that processed image?

REWKyleB avatar Mar 27 '15 19:03 REWKyleB

We don't support that at the moment. We were considering doing that, but there are some non-trivialities when it comes to bitmap-cache-key creation. Cache-key must reflect mutation, but we don't want to kick every other image from cache by filling it with many variants of the same image. In short, it's doable, we just haven't implemented it yet.

plamenko avatar Mar 28 '15 00:03 plamenko

Picasso handles this by having the cache key a function of the URI, resize parameters, transformation keys, etc... IMO it's pretty important, as currently a ListView with Postprocessor will always show spinner when you scroll back.

nat-e avatar Apr 03 '15 22:04 nat-e

Yeah, agreed. I'm working on it.

plamenko avatar Apr 04 '15 19:04 plamenko

Post processing works awesome! Looking forward to the caching to make it usable in a list view

KyleDBoyd avatar May 06 '15 20:05 KyleDBoyd

+1 for post-processed image caching!

Currently I'm post-processing background images which change a lot since they're bound to a list which updates the background every time a new list-item is displayed. And running a RenderScript blur over those images every time could be a battery drainer (I suppose)

cabbage avatar May 27 '15 13:05 cabbage

Added in v0.6.0. See http://frescolib.org/docs/modifying-image.html#caching-postprocessed-images.

tyronen avatar Jul 20 '15 21:07 tyronen