Feature Request: is_gimp, is_krita, is_paintnet

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.netcannot 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:
  if '$_host'=='gimp'
  elif '$_host'=='krita'
  else # Other hosts


@David_Tschumperle Documentation Request: Add $_host under Substitution Rules .