What did you do?
I want to add pure black text on a image with white background.
What did you expect to happen?
The whole image just has two kinds of color: black and white.
What actually happened?
At the edge of the words on generated image, many other colors appears.
What are your OS, Python and Pillow versions?
- OS: Windows 10
- Python: 3.5
- Pillow: 5.3.0
directory_name = "dataset/guwen_noise"
target_name = "dataset/watermark"
image = Image.new(mode='L', size=(64, 64), color='white')
draw_table = ImageDraw.Draw(im=image)
draw_table.text(xy=(0, 0), text='xxsad', fill='#000000', font=ImageFont.truetype(os.path.join("fonts", "Microsoft-YaHei-Regular.ttc"), 20))
image.save('my_test.png', 'PNG')

As we can see, many pixels are filled with other color. And I find it's useless to modify the "mode" parameter. I would appreciate it very much if you could help me!
What did you do?
I want to add pure black text on a image with white background.
What did you expect to happen?
The whole image just has two kinds of color: black and white.
What actually happened?
At the edge of the words on generated image, many other colors appears.
What are your OS, Python and Pillow versions?
As we can see, many pixels are filled with other color. And I find it's useless to modify the "mode" parameter. I would appreciate it very much if you could help me!