Question: Is there way to apply stylize two images from command line?

If this is wrong place to ask newbie question, I’m really sorry for disturbing.

First, I have two images. One is source, another is a material for stylize effect.
I think I would like to apply stylize effect from command-line to do batch processing.
https://gmic.eu/reference/stylize.html

Could I have the way to send two images to G’MIC command-line and apply stylize?

Hi @makkkraid

You came to the right place, no worries :slight_smile:
Basic usage to do that would be:

gmic image.jpg material.jpg stylize.. .

The stylize command has a lot of parameters (you can read them all with gmic h stylize), so you may want to use the copy command button in the GUI first to get the best settings.

1 Like

Hi @makkkraid and welcome!

And here are some more ideas:
https://gmic.eu/gallery/stylization.html

Hvae fun!
Claes in Lund, Sweden

1 Like

Thank you, @garagecoder and @Claes!
there is warmer than the fireplace.
Stylize is super fun, it makes magics literally.

Could I ask one more thing?

I follow this way, and I image the command like this for visual contact.(in Windows G’MIC-Qt stand-alone)
gmic_qt.exe --output test.png file1.png file2.png
But It did not works I intended.

Could I send two files as “layers” to G’MIC-Qt stand-alone?

Hello again,

Using the GUI is a little more complicated than I’d hoped. it seems the stand-alone GUI gmic_qt limits you to one input file at a time (is that correct @David_Tschumperle ? ).

The GIMP plugin version does let you use layers though. It also uses a “higher level” version of the stylize command: fx_stylize. I think that leaves us with two options: either use the plugin GUI to get settings for fx_stylize, or manually work out the settings for stylize.

With either command, I suggest invoking with gmic.exe rather than gmic_qt.exe. For example:
gmic input1.png input2.png fx_stylize 0,5,0,1,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,2,2,1.85,0 output[0] file1.png output[1] file2.png

You’ve probably noticed the output[1] syntax above - if you’re not too familiar with it, then there’s a good guide on this wiki page

Edit: looks like I just gave myself some work… even that wiki page is out of date too!

3 Likes

That’s a good question indeed. I don’t know. I’ll ask Sébastien (the plug-in developer) about it.
I’ve never used gmic-qt from the command line to be honest.

1 Like

From the wiki "About the image stack:
“Another very useful feature is ability to assign and refer to images by name…”

Churlish of me to crab when someone else contributes documentation, but I suppose I’m growing picky in my old age.

Names do not reference images. They reference selections. We almost always think the former because, ninety nine times out of a hundred, the selection we name happens to consist of just one image. But it is not being altogether picayune to recall the latter because it can do en mass kinds of things on large, named selections of images. Such as red-and-green stripes.

merryxmas:
   128,1,1,3,[127,127,127] s x nm[0--1:2] red nm[^red] green fill_color[red] 255,0,0 fill_color[green] 0,255,0 append x nm merryxmas

See:

Alas, I have some nits in my own account I need to pick.

Actually I would disagree with that - sure, you can name multiple images with the same name at the same time and also “select” multiple images which have the same name. But if it was the selection which had a name, you would be able to refer to a group of images by name regardless of their individual names (which is not the case). Having a selection as a distinct entity is an interesting idea though!

gmic sp sp sp nm "samename" e "{0,n},{1,n},{2,n}" nm[1] test b[samename] 3

Anyway, I’m not looking for a battle at all… whatever reads most easy for the beginner is what I’m in favour of!

Memo:
According to below, G’MIC-Qt has no options to handle layer things.

1 Like