It is currently 11 Apr 2021, 03:49

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | 🡆 Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Color To Alpha All Layers

Post your Script Requests for GIMP here.
Forum rules
Request your Script(s) for GIMP here in this forum.
Provide details of steps performed in GIMP so that script can be written for the process and also give the request a name so that scripts can be named after.
Wallace
Global Moderator

Color To Alpha All Layers

Post#1 by Wallace » 17 May 2019, 19:50


I need to remove white from a image, with more than 500 layers.
Doing this manually, would take decades, if not centuries.
Can a script or plug-in be created, which will do all this for me?
I also would like it, to be compatible with Gimp 2.8?
Image

tim
GL Blogger

Post#2 by tim » 17 May 2019, 20:12


Try run code on visible layers.
And use the code pdb.plug_in_colortoalpha(image,layer,(255,255,255))

That should do exactly what you want it to do.
(255,255,255) is the color of pure-white.
aka Tin

         

Wallace
Global Moderator

Post#3 by Wallace » 17 May 2019, 20:18


tim wrote:
17 May 2019, 20:12
Try run code on visible layers.
And use the code pdb.plug_in_colortoalpha(image,layer,(255,255,255))

That should do exactly what you want it to do.
(255,255,255) is the color of pure-white.
O.K. I'll give it a try.
Thanks. :thumbsup:
Image

tim
GL Blogger

Post#4 by tim » 17 May 2019, 20:19


Let me know if it works. I am 95% sure it does without having to test it.
aka Tin

         

Wallace
Global Moderator

Post#5 by Wallace » 17 May 2019, 20:44


tim wrote:
17 May 2019, 20:19
Let me know if it works. I am 95% sure it does without having to test it.
Yes it worked out well, thank you.
I completed my image in minutes, instead of decades. :giggle_purple:

However,
I would still want to be able to run Color to Alpha,
to remove any color selected by the color picker, from all layers with in an image?
Is there a script/plug-in, that already exists, or can this be created?
Image

tim
GL Blogger

Post#6 by tim » 17 May 2019, 22:15


Just replace (255,255,255) with any RGB color values.
aka Tin

         

tim
GL Blogger

Post#7 by tim » 17 May 2019, 22:17


If you absolutely must have a plug-in then I can create one but that's why I created that run-code on layers plug-it it's so you don't have to have a new script everytime you want something simple done on layers.
aka Tin

         

Wallace
Global Moderator

Post#8 by Wallace » 17 May 2019, 22:34


tim wrote:
17 May 2019, 22:15
Just replace (255,255,255) with any RGB color values.
That sound easy enough.
Thanks! :D
tim wrote:
17 May 2019, 22:17
If you absolutely must have a plug-in then I can create one but that's why I created that run-code on layers plug-it it's so you don't have to have a new script everytime you want something simple done on layers.
Thanks again, but it's not necessary. :thumbsup:
Image

tim
GL Blogger

Post#9 by tim » 17 May 2019, 22:49


I added script/plug-in anyways because there's some extra function (check to see if layers already has alpha channel or not, if not add alpha channel) so that color 2 alpha will work all the time.
viewtopic.php?p=26351#p26351
aka Tin

         


GIMP/GL:  Tutorials | Tips | Questions | Interests | 🡆 Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests