-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ImagePreviewFragment.kt #526
base: develop
Are you sure you want to change the base?
Update ImagePreviewFragment.kt #526
Conversation
Set the preferred config to Bitmap.Config.ARGB_8888
WalkthroughThe recent update introduces a minor yet significant enhancement to the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ImagePreviewFragment.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Changed from ARGB_8888 to HARDWARE for performance improvements. Quality remains the same as ARGB_8888.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ImagePreviewFragment.kt (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ImagePreviewFragment.kt
Include missed import for android.graphics.Bitmap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ImagePreviewFragment.kt (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- presentation/src/main/java/org/cryptomator/presentation/ui/fragment/ImagePreviewFragment.kt
Just to keep you up to date: I have done some more research and think this change needs more testing, but |
This will also fix #482 |
Fix banding in gradients by setting the preferred Bitmap config to Bitmap.Config.ARGB_8888 for SubsamplingScaleImageView
Summary by CodeRabbit