Skip to content

Commit 4a06123

Browse files
committed
fix: incorrect convert RGBA to RGB
1 parent f2b1284 commit 4a06123

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_image_diff/image_diff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def convert_color_mode(
5959
im = im.convert("RGBA")
6060
background = Image.new("RGBA", im.size, alpha_color or ALPHA_COLOR)
6161

62-
alpha_image = Image.alpha_composite(im, background).convert(color_mode)
62+
alpha_image = Image.alpha_composite(background, im)
63+
alpha_image = alpha_image.convert(color_mode)
6364

6465
return alpha_image
6566

0 commit comments

Comments
 (0)