Sometimes, I play with gmic on the command line, experimenting some basic ideas.
It often ends up with pure garbage, but sometimes I get cool and unexpected images or animations, only with a single command line. So, why not sharing these happy accidents ?
The concept of the challenge is then to propose a single command line (involving one single use of gmic) such that it generates something “cool” (still image, in .png or .jpg, or an animation as an animated .gif).
It would be cool if we could just copy/paste the command line on the shell and see what happens
Even if I think I’ll be the only one participant , I open this thread, and try to post new things regularly (at least when I get some new surprises). Anyone wants to play ?
Here is entry #1:
Command line:
$ gmic 500,500 repeat 10 +noise_poissondisk[0] "{3+$>}" done rm[0] a z f '!z?(R=cut(norm(x-w/2,y-h/2)/20,0,d-1);i(x,y,R)):0' slices 0 to_rgb f "max(I)?u([255,255,255]):I" blur_radial 0.6% equalize n 0,255
Did you come up with your one-liner by accident? What were you trying to do initially?
I write one-liners all of the time even though I should be using *.gmic files. The reason that I don’t do the latter is that I still don’t know how to import them into my user.gmic. Please help me figure that out. It would help me be more organized and motivated to write better filters.
Occasionally, the one-liners do result in something interesting (I may have shared a few before). I will keep this thread in mind when something new happens but I might not remember or it might be uninteresting.
Looks like something out of certain films!
Sadly I usually discard those accidents, I may have one or two kept though
I distinctly remember one with G’MIC looking quite snowflake-like.
The best I ever saw was one I couldn’t keep, back in the days of DOS. A random crash caused the most incredible animation, I assume due to data being executed as code!
Edit: found one! Very like glitch art so using a familiar image…
Ah, I thought this issue was already solved
I do it all the time in my .gmic file (on Linux), in my cli_start command (a command that is executed at startup by the gmic CLI tool). I can say the following command, put in my .gmic file works as expected:
cli_start :
v -
l[] m $HOME/work/src/gmic/src/gmic_stdlib.gmic onfail endl
l[] m $HOME/work/src/resources.gmic onfail endl
md3d 3
v +
I’m working on Linux, so $HOME is defined. But I’ll give a try on Windows this afternoon to see how this can be converted.
1. I don’t know how to save it with 3 channels while retaining the colour info. 2. Sometimes there is a bar at the bottom that I cannot crop because it isn’t fully black. E.g.,
f "angle=pi;i(sqrt((x-w/2)^2+(y-h/2)^2),sqrt((x-w/2)^2+(y-h/2)^2),z,c,1,1)"
f "angle=0;i(x*cos(angle)+y*sin(angle),-x*sin(angle)+y*cos(angle),z,c,1,2)"
The first makes circular textures out of images. The second’s some generic rotation thing that one can use to distort images.