ComfyUI-text-overlay icon indicating copy to clipboard operation
ComfyUI-text-overlay copied to clipboard

'ImageDraw' object has no attribute 'textsize'

Open RhodianSK opened this issue 2 years ago • 3 comments

Hello,

When trying to use the custom node, I keep getting the above error.

Any suggestions? 2023-10-11_08-37-29

RhodianSK avatar Oct 10 '23 21:10 RhodianSK

Looks like textsize is deprecated in Pil

change the line 48:

from

text_width, text_height = draw.textsize(text, font=loaded_font)

to:

text_width = draw.textlength(text, font=loaded_font)

aabreu avatar Nov 13 '23 16:11 aabreu

Looks like textsize is deprecated in Pil

change the line 48:

from

text_width, text_height = draw.textsize(text, font=loaded_font)

to:

text_width = draw.textlength(text, font=loaded_font)

Working! Thank You!

IckeBins67 avatar Aug 29 '24 21:08 IckeBins67