Sometimes gmic filters do not work on specific softwares due to limitations or bugs associated with host programming. There are some times when I make filters, and then realize paint.net
cannot use it. So, I would like to make error output say "Incompatible with Paint.NET
".
1 Like
Good idea.
Variable $_host can help you.
To be more precise, $_host
is a pre-defined variable whose value is a string that tells on which host the G’MIC interpreter is running.
- For the command-line tool:
dtschump@gmicky:~/work/src/gmic/src$ gmic e \$_host
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ cli
[gmic]-0./ End G'MIC interpreter.
- For the plug-in G’MIC-Qt for GIMP:
- For the plug-in G’MIC-Qt for Krita:
(I suppose something similar for the Paint.NET version).
- In a filter code, you can then easily test on which platform the plug-in is running:
foo:
if '$_host'=='gimp'
...
elif '$_host'=='krita'
...
else # Other hosts
...
fi
2 Likes
done.
2 Likes