nadermx / backgroundremover

Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.
https://www.backgroundremoverai.com
MIT License
6.45k stars 535 forks source link

unable to remove background from pdf #89

Closed mycomedico closed 11 months ago

mycomedico commented 11 months ago

I was trying to use backgroundremover on a pdf file, received the following error:

Traceback (most recent call last): File "/home/rubinglen/.local/bin/backgroundremover", line 8, in sys.exit(main()) ^^^^^^ File "/home/rubinglen/.local/pipx/venvs/backgroundremover/lib/python3.11/site-packages/backgroundremover/cmd/cli.py", line 239, in main remove( File "/home/rubinglen/.local/pipx/venvs/backgroundremover/lib/python3.11/site-packages/backgroundremover/bg.py", line 184, in remove img = Image.open(io.BytesIO(data)).convert("RGB") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/rubinglen/.local/pipx/venvs/backgroundremover/lib/python3.11/site-packages/PIL/Image.py", line 3280, in open raise UnidentifiedImageError(msg) PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fb3e7a4b290>

nadermx commented 11 months ago

Yes, it only works for images and video