mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-02 23:13:40 +03:00
Merge pull request #7021 from radarhere/getmask2
Do not render text if image has zero width or height
This commit is contained in:
commit
eeaee75a6e
|
@ -767,6 +767,7 @@ class FreeTypeFont:
|
|||
offset = offset[0] - stroke_width, offset[1] - stroke_width
|
||||
Image._decompression_bomb_check(size)
|
||||
im = fill("RGBA" if mode == "RGBA" else "L", size, 0)
|
||||
if min(size):
|
||||
self.font.render(
|
||||
text,
|
||||
im.id,
|
||||
|
|
Loading…
Reference in New Issue
Block a user