Skip to content
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

Fix image decoding color space issue on Android #319

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

keith2018
Copy link
Contributor

@keith2018 keith2018 commented Nov 7, 2024

If we use BitmapFactory for image decoding on the Android platform and do not set inPreferredColorSpace, the decoded color space will remain unchanged. If the original image is in the Display P3 color space and is used directly as a texture, it may result in color deviation. so it is necessary to set inPreferredColorSpace to perform color space conversion (to sRGB).

Ref: https://developer.android.com/reference/kotlin/android/graphics/BitmapFactory.Options#inpreferredcolorspace

@keith2018 keith2018 force-pushed the keith2018-patch-colorspace-fix branch 2 times, most recently from 2d0a4ea to 92647ac Compare November 7, 2024 10:31
@keith2018 keith2018 force-pushed the keith2018-patch-colorspace-fix branch from 92647ac to 83a2ef9 Compare November 7, 2024 11:16
@keith2018 keith2018 force-pushed the keith2018-patch-colorspace-fix branch from 83a2ef9 to 06c6e8d Compare November 7, 2024 11:34
@domchen domchen merged commit 936d8fd into Tencent:main Nov 7, 2024
8 checks passed
kevingpqi123 pushed a commit that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants