mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 01:04:45 +03:00
Fixes #6706
This commit is contained in:
parent
a4ec9f331c
commit
0671695e8e
|
@ -338,3 +338,17 @@ def test_matrix_identity():
|
|||
# Assert
|
||||
# No change
|
||||
assert_image_equal(converted_im, im)
|
||||
|
||||
|
||||
def test_rgba_premultiplied_to_rgb():
|
||||
im = Image.merge(
|
||||
"RGBa",
|
||||
[
|
||||
Image.new(mode="L", size=(1, 1), color=128),
|
||||
Image.new(mode="L", size=(1, 1), color=255),
|
||||
Image.new(mode="L", size=(1, 1), color=64),
|
||||
Image.new(mode="L", size=(1, 1), color=64),
|
||||
],
|
||||
)
|
||||
im = im.convert(mode="RGB")
|
||||
assert im.getpixel((0, 0)) == (32, 64, 16)
|
||||
|
|
|
@ -933,6 +933,7 @@ static struct {
|
|||
{"RGBA", "YCbCr", ImagingConvertRGB2YCbCr},
|
||||
{"RGBA", "HSV", rgb2hsv},
|
||||
|
||||
{"RGBa", "RGB", rgbA2rgba},
|
||||
{"RGBa", "RGBA", rgba2rgbA},
|
||||
|
||||
{"RGBX", "1", rgb2bit},
|
||||
|
|
Loading…
Reference in New Issue
Block a user