GMIC command line problem

(Yield) #1

Hi, i’m using gmic Version 2.2.1 from the command line on Ubuntu 17.10-artful x64.
I’m trying to learn more about the use of gmic from the command line and i was trying the command:

gmic --gimp_mix_lab 1,0,0,1.3,0,0,1.3,0,0,0,2 1237b0c9-2373-4545-a342-d3fdb4fbe8ed.png

I got the error:
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Input file ‘–gimp_mix_lab’ at position 0
[gmic]-0./ *** Error *** Unknown command or filename ‘–gimp_mix_lab’.

It happens with some other commands that begin with the --gimp flag
What am I missing here?

Thanks, regards.

(G'MIC staff) #2

Today, there are no more commands in G’MIC that start with -gimp_.
Hence, the command you invoke is not recognized and G’MIC thinks you want to input an image with such a name, which is obviously not the case :slight_smile: If you got this command from the G’MIC plug-in, then you are probably running a very old version of the plug-in (<2.0.0).
Maybe you should try updating your plug-in version to be able to get the right command to apply
(for Lab curbve, I guess it’s now called fx_mix_lab).

(Yield) #3

Thnx for your reply, as I mentioned I’m using gmic 2.2.1.

So, if i need to do a layer operation for example on several images or if i want to invoke those commands, what are my alternatives? if any…



@yield65 Welcome to the forum! G’MIC has a reference page with examples: The command you are looking at would be written this way:

gmic sample tiger fx_mix_lab 1,0,0,1.3,0,0,1.3,0,0,0,2
  • sample by itself inserts a random built in image.
  • sample tiger inserts the tiger image, where tiger is the argument of command sample.
  • same with fx_mix_lab. That is the command and the rest are the comma separated arguments.
  • if you want to use the default settings of a command just do fx_mix_lab , but sometimes arguments must be entered.
blur (+):

  std_deviation>=0[%],_boundary_conditions,_kernel |
  axes, std_deviation>=0[%], _boundary_conditions, _kernel 

Take blur e.g., from the reference page. There are two argument combinations possible. They are in separate rows. Arguments that start with _ are optional. Those that don’t must be entered. Hope this makes sense. I learned G’MIC not long ago. It could be confusing at first.

(Yield) #5

Thanks for your reply,

I don’t want to use the mix_lab, I want to know if it’s possible to use the set of instructions from GIMP, because i read that gmic was like a bridge to those commands, the gimp_mix_lab was just an example, i want to use some others but apparently they are not available anymore as --gimp_* if that is true then i believe my only alternative is to code some script-fu, am I correct?

Thanks, regards.


script-fu is a GIMP thing. Basically, it uses a series of GIMP commands, etc.

G’MIC is a separate app and a plug-in in GIMP. Try using the New layer(s) + Verbose (layer name) combination in the G’MIC plug-in window as follows:


It would name the new output layer with the correct command, provided that the plug-in is also >2.0.0, from which you would copy-paste the command as I have above.

Batch processing folder with powershell in windows 10
Sphere filter in Gimp but not in CLI??
(samj) #7



You can download this documentation and find the commands there:

Just copy the desired commands and paste them into G’MIC-Gimp.
The quotation marks are to be adapted according to your operating system.

To make operations on several layers you must specify it in G’MIC-Gimp with the input layer options.
You can select layers by indices, for example:

resize[-1] 50%,75% blur[-1,-2] 2


(Yield) #8

Thank you! That helped me a lot, also I found out that Local Contrast Enhancement works better than my method of using overlay layer effect to try to improve some details and colors.

Thanks a lot!