Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
color to alpha
#1
need help python plug-in
I am trying to help someone on my forum to automate some steps
and one of the steps is colortoalpha
so I used
pdb.plug_in_colortoalpha(image,active_layer,color) but it isn't producing the same result as doing it from front end.

but if you do it through the front end there are two other settings one of which is the transparency threshold.

How do I perform the same settings as the front end specifying those 2 extra settings in addition to color?

Thanks in advance.
Reply
#2
The 2.10 frontend uses a new GEGL plugin. If you want/need to use the 2.8 API, there is likely some preprocessing involved to emulate the two settings.
Reply
#3
so there's no way to call GEGL plugin?
or is there a way?
Sorry, I know nothing about GEGL or how to call it from existing python plugins.
Reply
#4
I think it is broken, shortly before 2.10.14 was released there was a rush of procedures aimed at replicating / replacing the old discrete compiled plugins. For colortoalpha see:
https://github.com/GNOME/gimp/blob/5d79f...compat.pdb
starting line 762

Then GEGL its self, running in the GEGL graph terminal colortoalpha works providing I do not specify a colour. Good for white only, or has the syntax changed?

bah humbug. Whole thing is a screw-up
Reply
#5
Also be aware that Color To Alpha has changed from 2.8 to 2.10

Open an image.
Put a white layer below.
Do Color To Alpha on the image. first in 2.8 (or 2.10 legacy); then in 2.10 default using the default white.


Attached Files Thumbnail(s)
   
Reply


Forum Jump: