0

I'm currently working on a small automation script for gimp. For this, I need the function

pdb.plug_in_vpropagate()

My problem now is, that the result of my script differs greatly from the resualt via the same filter with the (supposingly) same parameters via the UI.

The call of the python function (with the parameters) is:

pdb.plug_in_vpropagate(image, drawable, 1, 0, 1, 15, 0, 255)

The parameters I used in the UI are:

lower threshol: 0
upper threshold: 1,0
propagating rate: 1,0
all boarders
propagating value channel: yes
propagating alpha channel: yes

To exclude any mistakes done by other steps of my script (including values given via UI) I put everything besides this one command in comments. I also took a look in the python procedure browser in gimp to make sure that I get the right parameters. There I discovered that in the UI you can only choose values from 0 to 1 for the "upper threshold" while in the python procedure browser is written that you have to give values from 0 to 255. So to try if this may have been a mistake, I also tried the value 1 (which I used in the UI too), but the result still is totally wrong.

the result via UI, what it should look like

the result via the python command

Does anyone know how to make the "vpropagate" function work properly in python?

Das.Dev
  • 1
  • 1
  • Two remarks: 1) the "rate" parameter is documented as being a float, and you give an int. Many plugins/PDB functions (but I can't tell offhand for that one) will take either a [0.,1.0] float value or a [0,255] int value. – xenoid Jun 08 '18 at 12:00
  • Thanks, for the advice. The input element, that I got for the propagation rate, is already float right from the begining, only my hardcode is still int. Unfortunately changing the int to float also doesn't do the trick.... – Das.Dev Jun 08 '18 at 13:18

0 Answers0