Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting one pixel from each blob in a binary image
#7
Getting old and lost interest in most things these days. I am sure it will come as a matter of course eventually.

That is a good example but the Gimp 3 fog plugin is twice the size of the Gimp 2 fog plugin. Easy to see why when one line is replaced by eight.

Code:
----gimp2-------
    # add some clouds to the layer
    pdb.plug_in_plasma(img, mask, int(time.time()), turbulence)

----gimp3-------    
    # add some clouds to the layer
    pdb_proc   = Gimp.get_pdb().lookup_procedure('plug-in-plasma')
    pdb_config = pdb_proc.create_config()
    pdb_config.set_property('run-mode', Gimp.RunMode.NONINTERACTIVE)
    pdb_config.set_property('image', image)
    pdb_config.set_property('drawable', mask)
    pdb_config.set_property('seed', int(time.time()))
    pdb_config.set_property('turbulence', turbulence)
    pdb_proc.run(pdb_config)
Reply


Messages In This Thread
RE: Selecting one pixel from each blob in a binary image - by rich2005 - 10-25-2024, 07:06 PM

Forum Jump: