Gimp version: 1.2.1, OS: Irix 6.5.15 on an SGI O2.
I'm trying to use plug-in-colortoalpha in non-interactive mode from a
script, in order to look "through" the black part of an image into the
layer below. Unfortunately, non-interactive mode does not work for this
plugin. It always returns an "invalid parameters" error.
Looking at the code (downloaded from
http://registry.gimp.org/file/colortoalpha.c?action=view&id=257) I can
see the problem. On line 192, within the (runmode == RUN_NONINTERACTIVE)
case, it checks that the number of parameters == 5, the fifth one being
a threshold. If this parameter isn't passed, it returns
STATUS_CALLING_ERROR. However, this plugin is only registered with the
gimp to expect four parameters, and so a fifth parameter is never passed
(even if it is specified in the script).
The fix is pretty obvious. Either set this parameter to a default
(rather than returning an error) or register the plugin with five
parameters. The first solution is probably easier and would be
compatible with any current scripts that use plug-in-colortoalpha.
However, my system is not setup with all the gimp headers and libraries
to compile this, and I also don't have access to CVS to check the file
out and in. I was therefore wondering if there is some kindly soul out
there who wouldn't mind making this change and compiling it on Irix 6.5
for me, and sending the executable. I will even provide the corrected
source code if need be, although it won't have been checked out of CVS.
Pretty pretty please?
Thanks a lot,
Gimp-user mailing list