04-19-2019, 02:12 PM
(04-19-2019, 01:49 PM)ct197475 Wrote:(04-19-2019, 09:24 AM)Ofnuts Wrote:(04-19-2019, 07:05 AM)ct197475 Wrote: Thanks a lot Ofnuts for your swift answer proving Gimp is a real alternative;
yes I believe in automation;-) and I want to be autonomous on this matter if possible;
I have discovered that the "alfa to color" function with Threshold and Opacity set to 50% create a realy good job even in complicated background!
➤ I am missing the code though to batch process it as the Bimp in Gimp does not offer to deal with those functionality.
Would you have such a code that I could adapt to the file where I have 500 pictures to handle ?
https://stackoverflow.com/questions/4443...0#44435560
Thanks Ofnuts for this resource but where can I find the command that creates the action of getting color tonalphaband then setting Opacity and Transparency thresold ?
Sorry my knowledge is poor in gimp and Puthon
Filters>Python-fu>Console, and hit the Browse button. It's all there, use the search bar. The old Color-to-alpha (the one you can use via Python-fu) has no Transparency/Opacity thresholds, but I don't think it matters much in your case. In a script, I would:
* duplicate the layer,
* increase contrast and tweak the brightness so that everything you want to remove is white.
* apply color-color-alpha and remove the white
* alpha-select the result (IIRC, gimp_select_item() the layer)
* add a layer mask to the initial image, using the selection to initialize the mask
* delete the copy