Open MrZWJax opened 5 years ago
同样遇到了该问题,是在设置了背景图之后,请问您解决了吗
同样遇到了该问题,是在设置了背景图之后,请问您解决了吗
同问,一加背景图就出问题
def gen_bg_from_image(self, width, height):
"""
Resize background, let bg_width>=width, bg_height >=height, and random crop from resized background
"""
if height >= width:
height = width - 1
assert width > height
......
I edited the code to be able to run the code with 1 character @uceclz0 @zhangyingying520 @MrZWJax
运行过程中一开始没有问题,过一会儿就会出现assert width > height,然后一直循环在这个报错中,请问怎么解决
after pick font After draw_text_on_bg after pick font Retry gen_img: Traceback (most recent call last): File "main.py", line 67, in gen_img_retry return renderer.gen_img(img_index) File "/home/mrzwjax/PycharmProjects/text_renderer/textrenderer/renderer.py", line 50, in gen_img bg = self.gen_bg(width=word_size[0] 8, height=word_size[1] 8) File "/home/mrzwjax/PycharmProjects/text_renderer/textrenderer/renderer.py", line 403, in gen_bg bg = self.gen_bg_from_image(int(width), int(height)) File "/home/mrzwjax/PycharmProjects/text_renderer/textrenderer/renderer.py", line 425, in gen_bg_from_image assert width > height