cyrildiagne / ar-cutpaste

Cut and paste your surroundings using AR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot identify image file 'cut_mask.png' error

idelchev opened this issue · comments

Hi guys,

Everything was set up correctly but I got the following error when making a photo from my phone.
image

Any ideas on this one?

Thank you!

same issue Here.

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")

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