Collection of images
Closed this issue · 1 comments
y0un35 commented
What if i want to apply it on a all images in a folder?!
brilam commented
There is no function for a directory, however you can loop through all the images. It would look something like this:
from removebg import RemoveBg
rmbg = RemoveBg("YOUR-API-KEY", "error.log")
folder path = "some_dir"
for file in os.listdir(folder_path):
file_name = os.path.join(basepath, entry)
if os.path.isfile(file_name):
rmbg.remove_background_from_img_file("joker.jpg")