Gimp-Forum.net
Edit Color in a wallpaper - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Edit Color in a wallpaper (/Thread-Edit-Color-in-a-wallpaper)

Pages: 1 2


RE: Edit Color in a wallpaper - Ofnuts - 10-24-2018

(10-24-2018, 05:27 AM)dinasset Wrote: A "lateral" question:
- is there a PDB function callable for doing the Map/Rotate Colours?
I see it's a GEGL operation in 2.10, but it was there also on 2.8, so maybe there is a "legacy" pdb-equivalent function

Technically: plug-in-rotate-colormap() but... it doesn't take parameters besides a drawable, so is pretty much unusable.


RE: Edit Color in a wallpaper - dinasset - 10-24-2018

Thanks Ofnuts.
I suppose it's a "c" plug-in, so unreadable for me.
Does someone who reads "c" (assuming the source is available) understand "which" rotation will it do by default? 0-90 to 90-180? or what?

Edit: written a small .py to test it, but it seems "non existent" in 2.10


RE: Edit Color in a wallpaper - Ofnuts - 10-24-2018

(10-24-2018, 08:54 AM)dinasset Wrote: Thanks Ofnuts.
I suppose it's a "c" plug-in, so unreadable for me.
Does someone who reads "c" (assuming the source is available) understand "which" rotation will it do by default? 0-90 to 90-180? or what?

I assume this is the rotation you see when you start the dialog.

An equivalent script could be writable in Python using Numpy. All of this is scalar operations applied to matrices.


RE: Edit Color in a wallpaper - dinasset - 10-24-2018

That's certainly a good news, Ofnuts.
If you were thinking at me as the coder, I guess you hold me in too high esteem, I'm not at that level, sorry.
If someone much better coder than me can take the challenge, it would be a good enhancement to pdb.
Otherwise we all have to wait upon pdb on 2.10 being enhanced to perform gegl operations.


RE: Edit Color in a wallpaper - Ofnuts - 10-24-2018

Not thinking about anyone in particularSmile.

To any reader: Numpy isn't that hard; about the same difficulty as the Gimp API, I would say, so if you can master one, you can master the other. My recommendation is just to write/test the necessary functions outside of Gimp, using small arrays (5x5 max). When that works you can integrate it in a Gimp plugin. Debugging the Numpy code on real images is too much for a human brain.