I am trying to apply a vignette filter after applying a LUT and I ended up with gmic image.jpg ‘Agfa.png’ ‘map_clut[0]’ ‘[1]’ ‘o[0]’ -.png | gmic -.png vignette , o test.png
Where do I find more information on how to send the output of the map_clut directly to the vignette function without going through a pipe? I ended up with this as map_clut seems to ask for an output file name…
Thanks a lot. I wonder why I took me so long to discover gmic…
Also, you don’t have to save the file after every command, except if you want to save the result at that point in your pipeline. You can also use the d command (display)
Let me quote @grosgood about it:
Use the G’MIC display as a script breakpoint . The display command stops your script, dumps the image list to the shell and visualizes it. Now, New and Improved! You can observe the state of your script at the point of display. Drop as many as you want. Drop one after every executable line to emulate single-stepping.
That’s because we try to keep it a secret (Who gave Helmut the tip-off??!??).
Ah me. Now that you have tumbled onto the game, here’s (I hope) A gentle introduction to it.
Thank you - now it is obvious to me. Is there, by the way also a way of referencing the original inout file? I would like to resize with a height of 200, 1220, 1600 and 2000 pixels and it would be great if I would not have to re-load the original images 4 times.
+<some command> has duplication semantics. Also, citing an isolated selection decorator in a pipeline duplicates the cited image. There is also a multiplier notation: [0]x4 makes four copies of the first image on the list. The command r2dy seems to fit your ticket. +r2dy[0] 200 duplicates the first image on the list and resizes, preserving aspect ratios, to a height of 200 pixels.
n[quote=“prawnsushi, post:10, topic:39015”]
when/where can the multiplier be used?
[/quote]
No joy:
$ gmic 128,128,1,1,'u(255)' r2dx[0]x4 200%
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input image at position 0, with values 'u(255)' (1 image 128x128x1x1).
[gmic]-1./ Input file 'r2dx[0]x4' at position 1
[gmic]-1./ *** Error *** Unknown command or filename 'r2dx[0]x4'; did you mean 'r2dx'?
won’t work if the selection decorator is attached to a command, but:
gmic 128,128,1,1,'u(255)' +r2dx. 200% [0,1]x4
produces five pairs of small and large noisy images. Any valid image selection works, so
… [^0--1:2]x2 …
duplicates every odd-numbered item on the list. and