According to developers @luca020400 and BadDaemon, here is why the bug occurs:

The image is encoded in the "Google/Skia/E3CADAB7BD3DE5E3436874D2A9DEE126" color space (that's the full name of the color space - Skia is the name of a 2D graphics library made by Google)...
...In contrast, most images are encoded in sRGB. In Android 10 and older, there's a rare bug that can occur when converting the image to sRGB. (All images are converted to sRGB unless otherwise specified by devs in Android 10 or older.)...
...The bug happens when the code calculates the "luminance" value of each pixel by using the following formula:

Luminance = .2126f * r + .7152f * g + .0722f * b

where "r", "g", and "b" are red, green, and blue color values represented in 8-bit values from 0 to 255...
...The problem with this calculation is that it always rounds the final value up. The "cursed" wallpaper has the following RGB values: 255, 255, 243, which when plugged into the above equation results in:

Luminance = .2126 * 255 + .7152 * 255 + .0722 * 243 = 256
...The value causes SystemUI, and basically the whole OS, to crash because it exceeds the maximum value. It's a bug that's so incredibly specific because it involves a combination of a rounding error and color space conversion error...
This bug does not affect Android 11 because the image's "Skia" color space is not converted to sRGB by default, thus this rounding error and color space conversion error can't occur.

More details: https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/276907
You can follow @MishaalRahman.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.