mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixing two HEIF decoding issues on Android: API 36: ImageDecoder has a known issue decoding HEIF images with certain gain maps. Image won't load. The workaround is to use BitmapFactory instead. Pre-36: HEIF Flipping did not work. Image is upside. | |Before | After | |---|---|---| | Api 36 | <img width="320" height="714" alt="Screenshot_20251010_151132" src="https://github.com/user-attachments/assets/c1f48e0e-def8-4d8e-9847-c2ca9dac16e4" /> | <img width="320" height="714" alt="Screenshot_20251010_150551" src="https://github.com/user-attachments/assets/f0df1d19-3a5d-4751-b529-1e062a0af48c" /> | | Pre Api 36 | <img width="320" height="714" alt="Screenshot_20251010_150752" src="https://github.com/user-attachments/assets/9291d76b-d383-49d5-b9d7-add8bbf33e59" /> | <img width="320" height="714" alt="Screenshot_20251010_150703" src="https://github.com/user-attachments/assets/814454dc-d97a-4baf-9a8c-d9b5fe6ac51e" /> | Fixes: #176407 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. --------- Co-authored-by: Gray Mackall <mackall@google.com>