Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove plain background, set it transparent
#1
Hello,

I have 1500 png to process so I'm searching a script/plugin to do this.

Given a png, I would like the script to do the following:
- do a magic selection (wand/fuzzy) with starting point coordinattes 1,1 (I know this pixel is the background color)
- remove this selection and have transparency instead

I tried this script in a plugin via BIMP:
Code:
def plugin_use_fuzzy(timg, tdrawable):
   
    pdb.gimp_layer_add_alpha(timg)
    pdb.gimp_image_select_contiguous_color(timg, 0, tdrawable, 1, 1)
    sel = pdb.gimp_image_get_selection(timg)
    pdb.gimp_edit_cut(sel)
But it does nothing.
Could you help me please?
Reply


Messages In This Thread
Remove plain background, set it transparent - by bobJ - 04-22-2021, 10:07 PM

Forum Jump: