Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
batch processing with the fuzzy select tool
#2
First of all the caveat: Although I do use BIMP I am no coder, so very probably doing something basically wrong.

One problem with BIMP is some 'commands' are blacklisted, '-save, -free, -select ...' for example, which means the command you want does not show. The way around this is put the commands into a python plug-in and call the plug-in using BIMP's 'Other GIMP procedure'

I keep a BIMP boilerplate script and your procedure might look like this, nothing clever, very linear in operation

Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from gimpfu import*

def plugin_for_bimp(timg, tdrawable):
   Width = tdrawable.width
   Height = tdrawable.height

   centery = Width*1/2
   centerx = Height*1/2

   pdb.gimp_layer_add_alpha(tdrawable)
   pdb.gimp_fuzzy_select(tdrawable, centerx, centery, 70, 0, TRUE, 0, 0,FALSE)
   pdb.gimp_selection_grow(timg, 2)
   pdb.gimp_edit_cut(tdrawable)
   pdb.gimp_selection_none(timg)


register(
       "python_fu_for_bimp",
       "for bimp",
       "select",
       "*",
       "*",
       "*",
       "<Image>/Tools/for-bimp...",
       "*",
       [],
       [],
       plugin_for_bimp)

main()

EDIT: If you try that remember to save it as something.py, put it in your user profile plugins folder and make it executable.

That registers in the Tools menu and you can try it on an individual image.

The problem is now BIMP and in particular BIMP version 2.x   Apply that to the images and it renders 100% transparent images. An older version BIMP 1.8 works OK, so it looks to me like a BIMP 2.x problem. A shame you are using MacOS where only a BIMP 2.5 is available.

FWIW As an example, a 50 second animation using BIMP 1.8 https://i.imgur.com/lEmFeKq.mp4

You might be able to run the script from command line, I have never had much success there. I will leave that for the clever guys Wink
Reply


Messages In This Thread
RE: batch processing with the fuzzy select tool - by rich2005 - 07-18-2021, 11:41 AM

Forum Jump: