How to name a layer output to GIMP

Indeed, -name allows me to keep track of the images and access them when required. Very handy. Still need to be mindful of the order of images though and know when to move or reverse them.

I personally found that setting image names with labels avoids the need to remember the position of each image in the image list. With a list of labelled images, in which particular case do you have still to worry about the image order ?
I’m interested.

Indices in selections are always sorted in increasing order, and duplicate indices are discarded.

I don’t mind this behavior but it is kind of annoying sometimes. Here is a silly example:

gmic -sp tiger,lena -autocrop_seq auto ---[tiger,lena] ---[lena,tiger] ---[tiger] [lena] ---[lena] [tiger]

I see. That is indeed a case where it is not recommended to use the merging version of the arithmetic operators.
Instead of ---[tiger,lena], you should write ---[tiger] [lena], so that you don’t have to care about the image ordering.

Definitely, that is why it was a silly example. Maybe blending might be a better one or some others where it is a part of the syntax. I will keep that in mind when writing my own commands.

The -blend command also has a non-merging mode, e.g. -blend[base] [layer],overlay
I think this is also true for most of the command (e.g. -append has one too).

@grosgood has started writing a nice tutorial page about the -name command : http://particularart.com/tools-and-toys/gmic/command-guide/list-manipulation/-name/

Great page, as always!
Garry, one thing should be corrected anyway. When you write

The name may be composed of characters from the class [a-zA-Z0-9_], but cannot begin with a numeric

That is not completely true. You can associate any name you want with an image, e.g. -name "my name is 'Luka'" is correct. But if you don’t name your image like a variable name, you won’t be able to refer to it in selections afterwards, so e.g. -blur[my name is 'Luka'] 4 is of course not a valid command.

When interacting with the GIMP/Krita plug-in gmic-qt, image names are used to pass layer information (layer opacity, blending mode, layer position) from/to the plug-in to/from the host software, and in this case, input image names are often of the form: name(Layer name), pos(0,0), mode(alpha), opacity(100) which cannot be referenced in a selection. But this is really convenient as a filter can retrieve the layer information easily then, from the image name.
Similarly, if a filter output an image name like this, it can decide which blending mode, position or opacity will be used for the the output layers.

Ah! Thank you for the clarification, David. The page is a bit raw yet, so readers be advised. (David is familiar with the turmoil freshly minted Particular Art pages go through and generally doesn’t fetch them for gmic.eu until a week of settled dust has passed) Probably won’t touch the page until this afternoon (just after midnight, +2, methinks).

I’ve been tracking gmic-community on GitHub. Would you prefer pull requests in the fullness of time? I’ve been making a study of the various PA → gmic transforms which pages undergo, which seem straightforward. Whatever is simpler for you.

Take care,

Garry

1 Like

Hi @David_Tschumperle, sorry for some more (simple) questions:

  1. I used mode(overlay) and out comes soft light, I’m in Gimp 2.9.5 (@partha’s). What am I doing wrong?
  2. Could you elaborate somewhat on the pos command, please? What are the two numbers? (original position, later position)?

Thanks a lot!

I’ve tested here with GIMP 2.8, and it works as expected. Will test with GIMP 2.9 at home, tonight.

The two number are the offset (in px) of the layer, nothing else. You can set negative numbers for instance, if you want your layer to be outside the image canvas.
At least, this seems to work only with the G’MIC-GTK version, and not the Qt-based version! There seems to be a bug to fix then :stuck_out_tongue:

I’ve tested at home, with GIMP 2.9.5 running on Ubuntu 16.04, and it works (output blending mode ‘overlay’ really sets it to overlay).

Thanks I’ll rty again at home, maybe I did something wrong. which I didn’t notice yet.

:smiley: Now I get it!
As the duscussion was about output into Gimp layers I thought pos was the position in the layer stack. So it’s no surprise that all my tries with 1, -1, 2, -2 etc… didn’t affect the layer position and weren’t really visible, because I couldn’t see the pixel shift.

Ah OK. The order of the layers is just given by the order of the image in the G’MIC stack, the top layer being [0] and the bottom layer being [-1]. This info thus don’t need to appear in the image name.

I think it was when I was using a Mac a couple of years ago and installed McGimp on it that when I used a plugin in G’MIC, it automatically added the plugin name to the New Layer (I always use the New Layers option). That was so nice!

Maybe it was just how Gimp and G’MIC worked on the Mac.

I can make 50 layers in half an hour so having to take time to type in the plugin name for each layer is frustrating so I usually don’t add the G’MIC plugin name to the layers.

But I’d like to be able to refer back to which plugin created what effect on that image.

I think this is what you are talking about in this topic???

But truthfully, I don’t know what you’re talking about when you use words like scripting, command etc. Where does one even put that if they knew how?

Is there a non-coding way to have this happen?

Thank you.

They’re talking abiutbrunning gmic from the terminal. If you are using the GUI, see the post I linked.

Thank you for taking the time to respond to my query. :grinning: :grinning:

"They’re talking about running G’MIC from the terminal. If you are using the GUI, see the post I linked."

GUI = Gimp User Interface? G’MIC User Interface?
Terminal = ???
Link - I didn’t see one

"Layer: New Layer Output: verbose (layer name) Or something to that effect. I’m not in front of my com;puter.

I’m using Windows 10, GIMP 2.10.28, G’MIC-Qt for Windows 64 bits 3.0.0 pre#211005

I do choose the option to have the Output sent to a New Layer, but not the option to type anything in anywhere.

So, right now what G’MIC does is add the plugin effect to my image file as a new layer (the original layers name with the word COPY after it

Thank you,
ColorWorks

PS: I don’t know how to quote you with your name and everything.

Please post a screenshot of the gmic plugin

Hi Paper Digits,
I just found this info, perhaps this is what you were talking about?
http://gimpchat.com/viewtopic.php?p=98026#p98026
you can also experiment commands following these steps:
-open gimp
-open an image (no matter, even new one empty)
-go to filters
-select gmic
-when gmic opens:
-select “various”
-then select “custom code (local)”
-you may remove whatever you find in there
-then put your command(s)
-select “update” to see result in preview window or
-select “apply” / “OK” to have it executed

I can do this if you tell me what to type. If this is what you were talking about.

Thanks,
ColorWorks

In the bottom right hand corner it says Output Mode, from that, select New layer (verbose).

Hi Paper Digits,
I’m including a screenshot of the Output Options.
New Layer is an option but it doesn’t add the plugin name to the New Layer - it only adds the word ‘copy’ to the new layer’s name.
As you can see there is not an option called New Layer (verbose).