Using Remove.bg for image background removal (tutorial)

Post Reply
magnussandstrom
Member
Posts: 65
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden

Using Remove.bg for image background removal (tutorial)

Post by magnussandstrom » Wed Dec 09, 2020 8:31 pm

We just setup a new Switch flow using the amazing service remove.bg for removing backgrounds on all kind of images. I though I would share this here if anyone else would like to know how to setup a similar flow (since the HTTP request setup imho is a bit tricky).

1. Register an account on https://remove.bg and buy some credit or an subscription.
2. On the remove.bg account choose API and generate a API key
3. Use the flow element HTTP Request and do the following parameters:
a. URL: https://api.remove.bg/v1.0/removebg
b. Request type: POST
c. Attached file: [Job.Path]
d. Use MIME encoding: YES
e. File varible: image_file
f. Authentication scheme: none
g. Parameters: size=auto (here you can choose your wanted parameters from remove.bg API documentation)
h. Headers: X-API-Key: YOUR-API-KEY-HERE
i. Response: Inject as new job
j. Filename: [Job.NameProper].png
k. Input job: discard
4. Done

Enjoy!
Last edited by magnussandstrom on Mon Sep 13, 2021 12:38 pm, edited 1 time in total.
Tools at hand: Enfocus Switch, Esko Automation Engine, Esko Imaging Engine, Apogee Prepress, HP DFE, Fiery, Caldera, GMG ColorProof, PressSign, Redhat FUSE, Microsoft Azure and Google Cloud Services.

LarsA@normik.dk
Newbie
Posts: 9
Joined: Mon Mar 25, 2019 11:15 am

Re: Using Remove.bg for image background removal

Post by LarsA@normik.dk » Mon Sep 13, 2021 10:26 am

Thank you very much, Magnus.
It was very helpful.
Have you found a way to handle zip output files?
Zip files contain 2 files: color.jpg and alpha.png which must be combined into one photoshop file

magnussandstrom
Member
Posts: 65
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden

Re: Using Remove.bg for image background removal

Post by magnussandstrom » Mon Sep 13, 2021 11:06 am

Hi Lars, happy that it works for you!

I have not yet tried to utilize the ZIP option from Background.bg. But it should be possible to merge the two files with ImageMagick within Switch.

In our flow we shrink files larger then 25 mp to 25 mp with ImageMagick before routing to Remove.bg.
Tools at hand: Enfocus Switch, Esko Automation Engine, Esko Imaging Engine, Apogee Prepress, HP DFE, Fiery, Caldera, GMG ColorProof, PressSign, Redhat FUSE, Microsoft Azure and Google Cloud Services.

LarsA@normik.dk
Newbie
Posts: 9
Joined: Mon Mar 25, 2019 11:15 am

Re: Using Remove.bg for image background removal (tutorial)

Post by LarsA@normik.dk » Tue Sep 14, 2021 3:03 pm

Thanks, I'll try with ImageMagick :)

Post Reply