12-09-2022, 09:02 PM
(This post was last modified: 12-09-2022, 09:04 PM by rich2005.
Edit Reason: typo
)
Well, I repeat, my scripting ability is very basic.
The attached zip contains 3 files. color-exchange (linux), color-exchange.exe (win) , and a very simple two line plugin swap-rgb.py
Put the appropriate color-exchange & swap-rgb.py in your user plugins folder. swap-rgb.py registers in the Tools menu.
Fortunately your example uses rgb(255,0,0) red and rgb(0,255,0) green the layer position is in "image.layers[x] and works for your example.xcf. Edit as required.
Works here Gimp 2.10.32 / kubuntu 20.04 (providing you have a working gimp-python ) and Gimp 2.10.32 / Win 10 (VM)
How to put this into a batch file, I do not know. Might / might not help you.
The attached zip contains 3 files. color-exchange (linux), color-exchange.exe (win) , and a very simple two line plugin swap-rgb.py
Put the appropriate color-exchange & swap-rgb.py in your user plugins folder. swap-rgb.py registers in the Tools menu.
Fortunately your example uses rgb(255,0,0) red and rgb(0,255,0) green the layer position is in "image.layers[x] and works for your example.xcf. Edit as required.
Works here Gimp 2.10.32 / kubuntu 20.04 (providing you have a working gimp-python ) and Gimp 2.10.32 / Win 10 (VM)
How to put this into a batch file, I do not know. Might / might not help you.