jdhao's digital space

Recent content on jdhao's digital space

马上订阅 jdhao's digital space RSS 更新: https://jdhao.github.io/index.xml

Create Outline Text in Python with Pillow

2020年8月18日 22:12
update log
  • 2022-04-12: add warning about dangers of omitting stroke_fill parameter.

Sometimes, we may want to add outline color to text strokes with Pillow. Prior to version 6.2.0, we can not do this in Pillow. Fortunately, starting from version 6.2.0, pillow supports text outlines natively in its ImageDraw.text() method.