Gmic in Gimp, quickly get command line as output ?


Hello all,

Since there is some many possibilities in Gmic i’m not sure if this exists already or not, after a few search i couldn’t find anything clear so i’d better ask :

In Gimp with Gmic plugin is there a way to get the command line used, quickly and clearly, to then use it in the CLI version of Gm’ic and do batch processing for example or other things with the CLI?

I know you can output in verbose mode into the log file and then check the log and copy paste what you need, or verbose output for the layer and name the layer with the command , ends up in things like this for this last one:
[G'MIC] Pencil portrait: fx_pencil_portraitbw 30,120,1,0.5,144,79,21,0
Then you can check layer proprieties, copy name an keep only the last part of this line.

There is an option for the output in console but i could not get this to work, i’m on windows 7 and i’m not even sure this is aimed at windows platform to start with ( maybe possible in win10 since it offers more possibilities than Seven in this domain) or I simply don’t know how to use this…

In the end what i’d like to know is if there is a simple and quick way to get the command line, and only the command line, after modifying a picture with a filter, like a simple “export command line to clipboard” button next to the restore filter parameters one at the top of the screen or something else possible ?

Like i said there is maybe already something and i am too blind to see it.

Thanks a lot in advance.


In GIMP go to /Filters/Gmic/Utility/Recover Preset from Layer names

Make sure that in GMIC you also have the output messages option “Verbose (layer names)” selected.


Hello and thank you for the reply,

Unless i’m looking in the wrong spot i don’t have this, i’m using Gimp 2.8.22 and Gmic-Qt 2.2.0 if i recall correctly.

All i have in filters is the default Gimp ones and Gmic-QT acting as a direct link, no sub-menus or else for Gmic :

Am i looking in the right spot or am I missing something ?

Thank you very much



Yes, almost :slight_smile:

Try this method (I have not tested it in Win 7, only in Linux, but the principle ought to be the same)

  1. Open terminal (a cmd window).
  2. Start The Gimp from a command line.
  3. Open an image in The Gimp.
  4. Click Filters/G’MIC-Qt (as in the last image in your post, above).
  5. In the G’MIC dialogue, change Input/Output to Verbose (console).
  6. Select the filter you are interested in, for instance Felt pen. (For this test, do not change the default parameters.)
  7. Click OK.
  8. Quit The Gimp.
  9. What has happened in your command box? There you will find the command line needed:

[gmic_qt] Command: v 0 fx_feltpen 300,50,1,0.1,20,5,0


Have fun!
Claes en Lund, La Suède

(samj) #5


Here are some lines of commands to modify according to your configuration.

1 image :

cd C:\GimpEval-2.9.9-Win\64bit\bin
gmic.exe -i %CD%\..\..\images_test\gimp-splash.png fx_pencil_portraitbw 30,120,1,0.5,144,79,21,0

cd C:\GimpEval-2.9.9-Win\64bit\bin
gmic.exe -verbose -1 -i %CD%\..\..\images_test\gimp-splash.png -fx_pencil_portraitbw 30,120,1,0.5,144,79,21,0

Batch processing :

cd C:\GimpEval-2.9.9-Win\64bit\bin
for %f in (%CD%\..\..\images_test\*.png) do gmic.exe -i  %f -hearts 7



Hi all and Merci :slight_smile:

@Claes: I tried to open gimp from the command prompt in win7 ( as admin) and followed the steps, once closed there is nothing in the console, it doesn’t seems to communicate back to the console :confused:

@samj : Thanks a lot, i usually do a small batch file but this is handy too, thanks.

I’m not sure if it’s a general windows problem or a win7 issue only, or maybe a problem only on my end but beside getting the output to the log file and grab the filter command from there or get the new picture/layer with the filter name in it and copy it i can’t get things back to the console.

What i miss is a way to quickly get corresponding the Gmic command line used for the filter i used and if possible get it copied to the clipboard.

For now i will continue with my method of naming the layer with the command and copy past from there i guess.

Again thanks a lot for the tips guys,
Merci :wink:


That is a very good approach :slight_smile:
i.e. if it works for you, then use it!

Claes en Lund, La Suède


Well… I don’t have much other options apparently, at least as long as i stay with win7 :stuck_out_tongue:

Thanks again for all the answers guys.


I am also on win7 and I have been using portable versions of GIMP for a long time. I am currently using SAMJ’s latest version of 2.9.9 and in the screenshot, you can see the utility that I mentioned. It is also in Partha’s version, but his version is very old. The nice thing about portable versions is that you can have multiple versions to use at the same time. Maybe using SAMJ’s version will make your life easier.


Hello @Bilbo ,
Very sorry for the late reply, somehow i did not noticed the notification mail for your reply, was buried in a load of other mails, sorry for that.

And thanks for the tip, having a secondary portable installation can be the solution indeed, i have not much used the 2.9 versions, tested once but there was too much issues for me to keep it so i went back to main 2.8, i’m pretty sure i saw the 2.10 is not far from being released too, so i will probably test with the portable version in the next days and hopefully when 2.10 comes out this will be no more a problems to do what i need.

Thank you very much for the tip and sorry again for the late reply.


@Yalba Try the GIMP 2.9.8/9 64-bit Standard Edition build at Personally, I use the portable version. It is very stable on win7/10 and has the G’MIC plugin built in, though it is not the most current now because the pace @David_Tschumperle updates it :slight_smile:.

2.9.x (2.10) is a big leap from 2.8.x because you are able to use higher bit depths and have better colour management among other things. I don’t know what issues you have been having but it does spew warnings sometimes due to old scripts. However, these warnings are harmless and there is a way to turn them off.


Thank you, i tested it long time ago, can’t remember exactly what were the problems inside gimp itself ( had issues with one plugin i use a lot but this was expected ) so i just removed it and went back to 2.8. ( and yes color depths is a nice thing for 2.9-2.10 )

I will try the portable version yup, probably a lot of things have evolved or been polished since the last time i tried it,

thanks for the link and the advises :slight_smile: