Closed mneira10 closed 5 years ago
Pd: It would be amazing if users could set the image quality! This way, they could choose if they want to sacrifice their data consumption or not.
Thank you very much for your feedback! I'm planning to add a new settings option, where users can select the resolution of the images from Flickr.
By default, image resolution would be high enough for mobile users - maybe medium or small.
If you think how this feature could be implemented, share it!
This will be included in the v2.5 release, scheduled for release in June, since I'd have to implement a new system which checks user preferences.
Which quality levels should I, in your opinion, implement? I'm going to use the Flickr URL API, as you suggested in the pull request.
As for the quality levels, I was thinking about adding just three:
At this moment, the app uses two kinds of quality:
o
parameter, which retrieves them in their original size.c
parameter, which will be the new High quality parameter.Any suggest?
The issue boils down to a trade off between image quality and memory consumption. I would prioritize user experience and start at the upper end with high quality images and gradually decrease the quality until it is no longer pleasing. From that point, if the memory consumption is still too high, further optimizations would need to be done.
On the other hand, I think the quality levels are good. The benefit is that they are not too hard or tedious to implement.
I've been working in the image_quality
branch for a couple days now, and already pull all changes to the dev
branch.
As describe in #44, there's now a new setting, where you can select image quality for all photos, stock & downloaded ones.
If I have some spare time in the coming days, I'd like to check the performance improvements this new feature brings to the table.
If you want @mneira10, you could check how this improves performance.
Thank you very much for your feedback, you've helped me improve this app!!
Environment
App version:
2.3.1
Android version:
Android 9 Pie (API 28)
Device information:
Xiaomi Mi 8 lite
Description
The memory consumption of the app can get up to 300Mb!!! (see memory profile of the app in the images section) This happens because the urls gotten from the spacex API correspond to images in flicker that can be 6k by 4k and are stored in cache with the widget CachedNetworkImage in cache_image.dart.
What you'd like to happen:
To lower memory consumption and still have a great image quality, one could reduce the size of the images a little bit or consider not storing them in cache.
Alternatives you've considered:
The easiest way to reduce the image size is to use flicker's API. Here is how one can change the url of the images to get a lower resolution. I will be issuing a pull request soon with code that shows how that can be easily integrated in your app.
Images: