Skip to content

Commit

Permalink
Corrected writing I;16 text
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jul 7, 2023
1 parent 5e2332a commit 5bb2b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Tests/test_imagefont.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def test_I16(font):
draw = ImageDraw.Draw(im)

txt = "Hello World!"
draw.text((10, 10), txt, font=font)
draw.text((10, 10), txt, fill=0xfffe, font=font)

assert im.getpixel((12, 14)) == 0xfffe

target = "Tests/images/transparent_background_text_L.png"
assert_image_similar_tofile(im.convert("L"), target, 0.01)
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/Paste.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ fill_mask_L(
*out = BLEND(*mask, *out, ink[0], tmp1);
if (strncmp(imOut->mode, "I;16", 4) == 0) {
out++;
*out = BLEND(*mask, *out, ink[0], tmp1);
*out = BLEND(*mask, *out, ink[1], tmp1);
}
out++, mask++;
}
Expand Down

0 comments on commit 5bb2b61

Please sign in to comment.