Closed cedricholz closed 3 years ago
Was able to get working by reinstalling pipenv and adding correct flags.
pipenv shell pipenv --rm
export LDFLAGS="-L/usr/local/opt/zlib/lib" export CPPFLAGS="-I/usr/local/opt/zlib/include" export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
pipenv install --python 3.7
What did you do?
Tried to draw on an image with ImageDraw.
What did you expect to happen?
I expected text to be drawn on the image.
What actually happened?
The code that used to work no longer works when given an ImageFont.
What are your OS, Python and Pillow versions?
Code to reproduce:
I found the issue to be in ImageFont getmask2().
Specifically the
mode == "1"
no longer works. The error isTypeError: render() argument 3 must be str or None, not bool
The function is different on Pillow's repository. https://github.com/python-pillow/Pillow/blob/master/src/PIL/ImageFont.py
When used Pillow-SIMD with the new function it worked fine.