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 decoding high colour depth images. #358

Merged
merged 7 commits into from
Apr 11, 2020
Merged

Conversation

colinrtwhite
Copy link
Member

@colinrtwhite colinrtwhite commented Apr 11, 2020

High colour depth images (e.g. 16 bit pngs) can only be decoded by BitmapFactory as RGBA_F16. At the moment, we don't handle this properly and can accidentally allocate a bitmap that's too small to decode into.

This PR handles allocating a larger bitmap in this case. It also relaxes some cache checks around bitmap config. I think as long as allowHardware is strictly respected, the exact software bitmap config (RGB_565, ARGB_8888, RGBA_F16) should be considered best effort.

@colinrtwhite colinrtwhite merged commit 6224a83 into master Apr 11, 2020
@colinrtwhite colinrtwhite deleted the colin/high_depth_images branch April 11, 2020 07:19
colinrtwhite added a commit that referenced this pull request Oct 5, 2022
* Fix decoding high colour depth images.

* Update API.

* Fix test.

* Refactor.

* Fix test.

* Fix tests.

* Rename tests.
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.

None yet

1 participant