This is correct. Now, every plug-in user will get all community filters by default, not only those defined in the stdlib.
Could there be a nice way to reference an “image variable” in a command, as if it were an image in the stack?
For example, this is something I don’t think is currently possible:
sp +mirror x
store. my_img_var
add[0] $my_img_var
Yes, obviously you can restore the image first with i $my_img_var
and store after. But what I’m thinking about is storing non-image data structures in a way which can easily be passed to other commands which know about it. I suppose the general principle is expanding the use of images as variables, outside of the image stack.
Edit: perhaps multiple image stacks is out of the question too?
It’s currently not possible indeed, and I’m not sure that would be a good thing after all.
I need to think about it
I clearly see pros and cons. But cons are more ‘technical’ reasons (so maybe not good ones).
A question, is it possible to implement circular dial for gui version of gmic?
Two One apparent bug related to display windows:
- I’m probably being stupid, but I can’t hide the mouse pointer with
cursor
for anything other than window 0 -
Fullscreen mode only: occasional corrupt display when switching between images on a single window (e.g. window 0). This one needs a better bug report, but it looks like a threading problem sometimes still displaying pixels from the previous image. Could also be display driver problem though, so I need to test on other machines.
Update regarding fullscreen problem (it’s my display driver):
I tested on another machine, it does not happen. Weirdly it’s only when the resolution is exactly that of the display, reducing by even 1px (e.g. 1919) makes it go away. Here is a test line if anyone else cares to test it (obviously replace with your screen native resolution):
gmic repeat 20 sp k. r 1920,1080 w. 100%,100%,0,1 wait done
For screen width, height. This might help - G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Substitution Rules .
Is this on Windows ?
At least on Linux, this seems to work as expected:
bug :
sp lena,256
sp colorful,256
sp earth,256
w0[0]
w1[1]
w2[2]
cursor[2] 0
do wait 100 while 1
opens 3 windows and the mouse cursor disappears only when mouse is over the window containing the earth image.
Will test on Windows ASAP.
Works for me also on Windows (Windows 7).
Works for me on 2.9.9 (win10, pre-210824) as David describes:
System:
Kernel: 5.13.0-7620-generic x86_64 bits: 64 compiler: gcc v: 10.2.1
Desktop: GNOME 3.38.4 Distro: Pop!_OS 21.04 base: Ubuntu 21.04 Hirsute
The bug appears only when using a single window. Example:
bug :
sp lena,256
sp colorful,256
sp earth,256
w2[2]
cursor[2] 0
do wait 100 while 1
Bonjour,
Voici des tests d’affichage plein écran à partir d’un terminal sous Windows 10 64 bits
Terminal Windows ???
La disparition du curseur de la souris est plus ou moins aléatoire et je n’arrive pas à trouver une logique.
Ligne de commande :
gmic cursor 0 repeat 20 sp k. r 1920,1080 w. 100%,100%,0,1 cursor 0 wait done
Terminal MSYS2
La disparition du curseur de la souris est correcte
Ligne de commande :
./gmic cursor 0 repeat 20 sp k. r 1920,1080 w. 100%,100%,0,1 cursor 0 wait done
Le curseur de la souris est présent
Ligne de commande :
./gmic cursor 1 repeat 20 sp k. r 1920,1080 w. 100%,100%,0,1 cursor 1 wait done
@samj Your command is predictable on my system. I only see the mouse at the start but when I move it it is hidden. One oddity is that the image only changes with input: either by mouse clicks/movement or by keyboard. Larger/longer inputs equal to multiple inputs; i.e. scroll through more images. Is this what the command is supposed to do?
Bonjour,
Try repeating the command line several times in the same terminal.
You must never see the cursor of the mouse.
You can change the image with the spacing bar, the ENTER key without touching the mouse.
I see what you mean. Before your suggestion, I tried 3 times with the cursor present at the beginning. After several more tries I see your point on it being there and not being there at the beginning. It isn’t consistently correct or wrong. Maybe it is a Windows issue because the OS sometimes has focus problems depending on your configuration and the software in use.
I confirm this. I’ll investigate
La modification " Fix command ‘cursor’ when applied on other display than ‘w0’ " supprime l’erreur "sp lena,256 sp colorful,256 sp earth,256 w2[2] cursor[2] 0 … " sous Windows.
Merci :o)
Le ‘problème’ d’affichage du curseur en plein écran avec le terminal Windows est toujours présent.
I notice there is no da_pop()
, and da_remove()
does not return the removed value either. Must we do da_pop=(V=i[da_size()-1];da_remove();V)
or did I miss something?
I was struck by such asymmetry as well.
gstatedemo.gmic
:
# First in, first out queue...
foopush : -skip ${1=0}
-local[stack]
-eval "da_push(#0,$1)"
-endlocal
barpop :
-local[stack]
-status {"if(da_size(#0)>0,pop=I;da_remove(#0,0,0));_(Do things with pop.);pop"}
-endlocal
where one custom command, foopush
pushes state subsequently accessed by another custom command barpop
:
$ gmic gstatedemo.gmic 0 name. stack foopush 1234 barpop echo "From the stack: "'${}'
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input custom command file 'gstatedemo.gmic' (4 new, total: 4468).
[gmic]-0./ Input empty image at position 0 (1 image 0x0x0x0).
[gmic]-1./ Set name of image [0] to 'stack'.
[gmic]-1./ From the stack: 1234
[gmic]-1./ Display image [0] = 'stack'.
[0] = 'stack':
size = (1,2,1,1) [8 b of floats].
data = (1234;0).
min = 0, max = 1234, mean = 617, std = 872.57, coords_min = (0,1,0,0), coords_max = (0,0,0,0).
[gmic]-1./ End G'MIC interpreter
Note the local blocks in each custom, for there may be many such images serving as backing storage, and custom commands coordinating their state around one such store probably should address such by name.
Some further remarks along these lines may appear later in G’MIC Tutorial Fragments in the sweet by-and-by.
Getting to the point of too many questions now, I do apologise!
Update: I did some testing, it seems arg2var
handles the below properly. That should give me enough to work with - this question can now be ignored
The next one: is there a good way to handle the use of files
where some of the returned file/directory names contain commas and/or spaces?
So far I’ve worked around spaces in my own way, but commas give me trouble when trying to get the individual file names…
Edit: don’t shoot me, I would never use commas in filenames by choice!