1

I am writing a python-fu script for gimp that should have a line where it select all pixels of certain color. To do this, I added the line:

    gimp.pdb.gimp_by_color_select(clipLayer,(white_level,white_level,white_level),0,CHANNEL_OP_REPLACE,TRUE,FALSE,0,TRUE)

where cliLayer is the layer I'm working on (top layer) and white_level is an input parameter.

When I give the value manually (e.g replacing the (white_level,white_level,white_level) with (136,136,136)), the selection is carried properly, why is that so?

Yotam
  • 10,295
  • 30
  • 88
  • 128

1 Answers1

1

Adding

white_level = int(white_level)

at the beginning of the function solve this.

Yotam
  • 10,295
  • 30
  • 88
  • 128