Cannot identify image file 'cut_mask.png' error
idelchev opened this issue · comments
Ivan Delchev commented
aftabaminzoobiapps commented
same issue Here.
MUDDU RAMAKANT commented
I found a hack . Just paste bold line lines below . For me this worked for low size images
with open('cut_mask.png', 'wb') as f:
f.write(res.content)
shutil.copyfileobj(res.raw, f)
im1 = Image.open(r'cut_received.jpg')
im1.save(r'cut_mask.png')
logging.info(' > opening mask...')
mask = Image.open('cut_mask.png').convert("L")
Xue LI commented
I tried it. It doesn't work. What do your mean by "for low size images"? Do I need to resize an image to a small size when capturing it