What did you do?
I used PIL Library to write some text on my tif file.
What did you expect to happen?
To open the file, draw text on it and save it in some folder
What actually happened?
When I am using tif file of 163kb I am getting the error mentioned in Title.
If used tif file of size 71kb, I didn't get any error and my task completed successfully.
What are your OS, Python and Pillow versions?
- OS: Windows 10
- Python: 3.10
- Pillow: 8.4.0
path="my_path"
image_file = Image.open(path)
font_type = ImageFont.truetype('.ttf file here',30)
draw = ImageDraw.Draw(image_file)
draw.text(xy=(300,400),text= "some text here",fill ="black",font=font_type)
image_file.save("output path here")