Merged requested to merge martinwalch/qtbase:kde/5.15 into kde/5.15
Bitmaps with color channel depths other than 8 bits do not scale properly, i.e. they decode to inadequate colors. For example the brightest color from a bitmap with 5 bits per channel is not white (#FFFFFF), but a light gray (#F8F8F8).
Scale samples up by periodically repeating the bit pattern of each value to fill up the lower bits instead of padding them with 0.
Vice versa truncate samples that exceed the bit depth of QRgb.
Reviewed-by: Eirik Aavitsland email@example.com
(cherry-picked from commit 1fee7adc)