This is the changelog for the release of the 2.6 version of the G’MIC software.
It lists all new features and changes done since the latest major version 2.5(.7).
What is G’MIC?
G’MIC (GREYC’s Magic for Image Computing) is a full-featured open-source framework for image processing. It provides several different user interfaces to convert/manipulate/filter/visualize generic image datasets, ranging from 1D scalar signals to 3D+t sequences of multi-spectral volumetric images, thus including 2D color images.
- G’MIC main project page : https://gmic.eu
- G’MIC download : https://gmic.eu/download.shtml
- G’MIC web service : https://gmicol.greyc.fr/
- G’MIC language tutorial pages : https://gmic.eu/tutorial/basics.shtml
- Support G’MIC development : G'MIC — Association LILA
What’s new in version 2.6?
We had one major change in the interpreter syntax, which makes new developed filters incompatible with the previous branch 2.5.x, hence the new branch 2.6.x (see Improvements below).
Improvements / Changes:
- Commands
if, elif, while
andfor
that control program flow now accept an expression as its argument, which is automatically evaluated if needed (if specified condition is not given explicitly as a boolean). This is also the case for commandrepeat
. As a result, this allows to remove a lot of opening/closing braces in the code of the filters, for more readability. For instance, the code below is now valid:
foo:
if $!<3 # Rather than 'if {$!<3}'
repeat 2*$!+3,var echo $var done # Rather than 'repeat {2*$!+3}'
fi
- Commands
if,elif, while
andfor
do not test the existence of a file anymore. If the provided condition is not a boolean or a valid expression, an exception is thrown.
To test the existence of a file or a folder, useisfile()
andisdir()
:
foo:
filename="C:\Folder\filename.ext"
if isdir(['{/$filename}']) # Rather than 'if $filename'
...
fi
The new expression is more verbose, but this avoids mistakes like if (x+3*(y+2)
(here a closing parenthesis is missing in the expression, and in previous versions this "condition’ was silently evaluated to false
, as file if (x+3*(y+2)
does not exist, now this throws an error).
-
Man pages have been improved.
-
Math function
isval()
is replaced byisnumber()
. This functions tests if its argument is an explicit number, e.g.isnumber(0.3) = true
, andisnumber(pi) = false
. -
Math function
isval()
still exists, but now tests if its argument is a valid math expression, e.g.isval([pi,0]) = true
andisval(foo://)=false
. -
Multi-line comments are now supported to document
.gmic
files. A multi-line comment is a comment written with multiple lines but intended to be in a single line, such as:
#@cli Default values: 'arg1=0', 'arg2=0', \
# 'arg3=0' and 'arg4=0'.
which is equivalent to
#@cli Default values: 'arg1=0', 'arg2=0', 'arg3=0' and 'arg4=0'.
This is useful for documenting default values and command definitions where there are a lot of arguments involved.
Bug fixes:
-
Command
parallel
now better manages threads that throw exceptions (e.g. with commanderror
). This was causing hang sometimes in preview G’MIC versions, due to multiple thread cancellation requests done at the same time. -
Commands can be invoked now with an arbitrary large image selection. Previously, the string describing the image selection was limited to
256
characters.