rembg icon indicating copy to clipboard operation
rembg copied to clipboard

Cannot remove background from (formerly) jpg

Open Cold-A-Muse opened this issue 5 years ago • 2 comments

Hi there, first of all thank you so much for this extremely helpful tool which works amazing with pngs. I am running into an issue when dealing with JPGs where it never removes the background no matter the file. I tried to solve this with the following code by converting the JPG into an PNG using the pillow library.

input_file_path = f'/tmp/{base_folder}/input.png' im = Image.open(logo_path).convert("RGBA") im.save(input_file_path)

I am using this solution where sys.stdout.buffer.write(remove(sys.stdin.buffer.read())) is put in a python file and then running cat input_file_path | python remove.py > rembg_output_file_path

But still no luck. What could possibly the reason for this?

Cold-A-Muse avatar Apr 20 '21 06:04 Cold-A-Muse

Can you provide the image?

danielgatis avatar Jun 25 '21 14:06 danielgatis

I am also stucked jpeg is notsupporting rembg package any solution would be appreciated.

sbairagi avatar Oct 10 '22 08:10 sbairagi