diff --git a/Tests/images/imagedraw_bitmap.png b/Tests/images/imagedraw_bitmap.png new file mode 100644 index 000000000..05337b693 Binary files /dev/null and b/Tests/images/imagedraw_bitmap.png differ diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 2a1f963c7..0a9366928 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -71,6 +71,20 @@ def test_arc2(): helper_arc(bbox2) +def test_bitmap(): + # Arrange + small = Image.open("Tests/images/pil123rgba.png").resize((50, 50)) + im = Image.new("RGB", (w, h)) + draw = ImageDraw.Draw(im) + + # Act + draw.bitmap((10, 10), small) + del draw + + # Assert + assert_image_equal(im, Image.open("Tests/images/imagedraw_bitmap.png")) + + def helper_chord(bbox): # Arrange im = Image.new("RGB", (w, h))