Open brownowski opened 8 months ago
The recent update introduces a minor yet significant enhancement to the ImagePreviewFragment
within a Java application, focusing on image presentation. By specifying the bitmap configuration to ARGB_8888, the change aims to optimize the visual quality of images displayed to the user, ensuring richer color depth and better overall image clarity.
File Path | Change Summary |
---|---|
.../presentation/ui/fragment/ImagePreviewFragment.kt |
Added a line to set the bitmap configuration to ARGB_8888 before image display. |
🐰✨
In the realm of bits and bytes, a rabbit hopped tonight,
Tweaking colors, bright and true, in ARGB's splendid light.
With a hop, skip, and a leap, it set the pixels right,
Now every image, clear and deep, shines incredibly bright.
🌟🖼️
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks for your contribution! 💚
Do you know if this is still a problem? davemorrissey/subsampling-scale-image-view#366
Hmm, it might be.
I've run some tests, and I found that Bitmap.Config.HARDWARE performed better on my tablet. I had a hard time noticing any performance issues with ARGB_8888 on my phone, and HARDWARE seemed to work well too.
On my tablet I did notice some stuttering when scrolling between larger images with ARGB_8888, or panning on a few select files. This went away with HARDWARE, and it still also resolved the banding issue.
It might be worth testing it out on more devices, but switching to Bitmap.Config.HARDWARE might be better than ARGB_8888.
Just to keep you up to date: I have done some more research and think this change needs more testing, but Bitmap.Config.HARDWARE
sounds like the way to go to me.
This will also fix https://github.com/cryptomator/android/issues/482
Fix banding in gradients by setting the preferred Bitmap config to Bitmap.Config.ARGB_8888 for SubsamplingScaleImageView
Summary by CodeRabbit