It is currently 23 Oct 2019, 17:19


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

GIMP Script RequestsColor 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.
Post Reply
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?
0 x
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.
1 x
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         

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:
0 x
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.
1 x
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         

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?
0 x
Image

tim
GL Blogger

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


Just replace (255,255,255) with any RGB color values.
0 x
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         

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.
0 x
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         

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:
0 x
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
1 x
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         


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
  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

Who is online

Users browsing this forum: No registered users and 2 guests