1

I'm using GIMP 2.10.6 on Ubuntu 18.10.
I'm trying to script an automatic image manipulation, and for part of the workflow I need to dither a layer in my image.

I can't find anything in the script-fu/python-fu API that exposes the functionality provided by the dialogue located at Colors > Dither...

enter image description here

Am I missing something? Or does it just not exist?

8
  • What do you mean by "anything that exposes the functionality"? Haven't you tried it on an image?
    – Billy Kerr
    Commented Jun 21, 2019 at 21:52
  • @BillyKerr, I've updated my question so hopefully it's a bit clearer. I am looking for a way to access this functionality from the python api.
    – jpheldson
    Commented Jun 21, 2019 at 21:55
  • 1
    On the contrary, this is a question about GIMP scripting functionality. Tags on this site such as "script", "batch-processing", "photoshot-scripting" and their related questions would suggest otherwise. I'm not asking about Python syntax or about coding practice, I'm asking about available features specific to a graphic design program.
    – jpheldson
    Commented Jun 21, 2019 at 22:18
  • 1
    Have a look at this thread on gimp-forum(dot)net. It would seem it doesn't exist, as you say.
    – Billy Kerr
    Commented Jun 21, 2019 at 22:35
  • 1
    Also there's a more specific python-fu tag available over at Stack Overflow - and as far as I can tell, user @xenoid has answered most of these. He also answers graphic design questions here. Hopefully he'll see this and can help more than me.
    – Billy Kerr
    Commented Jun 21, 2019 at 23:16

1 Answer 1

0

The python-fu procedure is

pdb.gimp_levels(drawable, channel, low_input, high_input, gamma, low_output, high_output)

See the photo, I tested using the blue channel (number 3, as the procedure navigator explains) and my image got more blue!

tested! Works!

1
  • I'm afraid not. That appears to be the "Colors > Levels..." dialog, particularly when working in one of the color channels. Dithering is a way to add perceived color depth by adding visual noise.
    – jpheldson
    Commented Apr 4, 2022 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.