Release of G'MIC 3.0

This is the changelog for the release of the 3.0.0 version of the G’MIC software, released on 2021/12/09.

It lists all new features and changes done since the previous major version 2.9.

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.

supportus



^ The plug-in G’MIC-Qt in action, running for GIMP 2.10 ^


What’s new in version 3.0.0?


From 2.9.9 to 3.0.0

New features:

  • [gmic_qt-300] New filter Repair / Denoise, implements a denoising algorithm based on convolutional neural networks. That is the first machine-learning based filter in G’MIC. New command denoise_cnn allows to apply this algorithm from the command line as well.


  • [gmic_qt-300] New filter Patterns / Triangular Pattern, generates random patterns based on random subdivisions of triangles.


  • [gmic_qt-300] New filter Deformations / Breaks. Somehow similar to filter Deformations / Crease but with more sharp and triangular shapes (request from David Revoy).

  • [gmic_qt-300] Implementation of user-defined “tags”, allowing to tag filters with different colors to make them easier to find.

  • [stdlib-300] Integrated Neural Network library has been improved, with the implementation of
    a new network module (crop), a new optimizer (RMSprop) and a new neural network training module (trainer) that allows to choose different optimizers and learning rate schedulers. Still work in progress.

  • [stdlib-300] New command lorem which downloads a random image from the Lorem Picsum web service (https://picsum.photos/).

  • [stdlib-300] New commands resize2din, resize2dout, resize3din and resize3dout (and their shortcuts r2din, r2dout, r3din and r3dout), that resize images with min/max constraints on the size, while preserving 2D or 3D aspect ratio.

  • [stdlib-300] New command files2img inserts a new image where each row corresponds to one filename return by command files.

  • [core-300] New substituting expressions {*,i} and {*,j} can be used to retrieve the XY coordinates of a display window.

  • [core-300] Predefined variable $_cpus can be assigned now, to set the max number of threads a G’MIC command can use when multi-threading operations are done.

  • [math-core-300] New functions da_size(), da_insert(), da_push() and da_remove() to natively manage dynamic arrays in math expressions.

  • [math-core-300] New function isvarname(str) returns 0 or 1 whether given string argument str is a valid name for a variable or not.

  • [math-core-300] Function resize() has been extended to allow the resizing of an input vector seen as an image.

Improvements / Modifications:

  • [gmic_qt-300] By default G’MIC-Qt now embeds all community filters, not only those from the standard library.

  • [gmic_qt-300] Recode filter Colors / Chromatic Aberrations from scratch, adding lot of new controls to render more different types of chromatic aberrations.

  • [stdlib-300] Recode command delaunay from scratch, allowing to output the delaunay triangulation as two sets of points/faces coordinates.

  • [stdlib-300] Recode command minimal_path to make it faster.

  • [stdlib-300] Recode command animate3d for generating animations of rotating 3D objects.

  • [stdlib-300] Recode command uniform_distribution to get more uniform results for odd number of points.

  • [stdlib-300] Recode command pixelsort to be faster. As a result, filter Degradations / Pixelsort should be also more optimized.

  • [stdlib-300] Commands gradient and hessian have been recoded as custom commands (rather than native ones). They now allow to use any kind of boundary conditions.

  • [stdlib-300] Commands columns, rows, slices and channels have been recoded as custom commands (rather than native ones).

  • [core-300] Improve processing of input filenames with extensions arw, cr2, nef and .dng. When read, they are now passed to dcraw as a preprocessing step to get a 16-bits/channel input image.

  • [core-300] Command distance in dijkstra + path mode : path is now returned as the second channel of the distance image, rather than a second output image.

  • [core-300] Commands erode, dilate, blur, deriche, vanvliet, boxfilters (and derivations) now accepts extended boundary conditions (including periodic and mirror modes).

  • [math-core-300] Function merge() accepts more merging operator : &, |, &&, || and xor.

  • [build-300] Binary packages are now provided for latest versions of Ubuntu Hirsute (21.04) and Impish (21.10).

Bugfixes:

  • [core-300] Fix command cursor when applied with a non-singleton display selection.

  • [math-core-300] Fix bug when function polygon() is called with invalid arguments (s.a. nan coordinates).

  • [math-core-300] Fix code to correctly parse conditions as var%==sth.


From 2.9.8 to 2.9.9

New features:

  • [gmic-qt-299] New filter Artistic / Paint With Brush, simulates the conversion of an input photograph to a painting.

  • [core-299] Explicit specialization of +command is now possible when writing custom commands. Useful to avoid image copy when a custom command inserts new images on the list without having to modify the input selection (e.g. psnr or mse like commands).

  • [stdlib-299] New command input_csv reads the content of a .csv file (usual text file format for storing tabular data).

Improvements / Modifications:

  • [core-299] Commands plot and graph now accept formulas that output a vector-valued function.

  • [core-299] Builtin commands that insert new images on the list can be called indifferently with a starting + sign or not (e.g. +pass, +shared, +input).

  • [core-299] Command histogram now always requires a valid argument ((noarg) not accepted).

  • [stdlib-299] Commands mse and psnr have been recoded as custom commands (rather than builtin).

Bug fixes:

  • [core-299] Fix input expression (list_of_values:c) which was not unrolled along the c axis.

From 2.9.7 to 2.9.8:

Release date: 2021/07/16

New features:

  • [gmic-qt-298] The API of G’MIC-Qt has been revamped and allows more flexibility for the host software. The stand-alone version gmic_qt has many new options to control it from the command line, e.g. to allow batch processing.

  • [stdlib-298] Started the implementation of a machine learning library (new commands whose names start with nn_*). Hopefully, this will enable the development of useful ML-based image processing filters in G’MIC in the future.

  • [stdlib-298] New command meigen returns an approximation of the m largest eigenvalues of a (large) square matrix, using the Arnoldi iteration method. New math function meig() does the same, inside the math parser (included in math_lib).

  • [stdlib-298] New command arg2img splits specified list of arguments and return each as a new image (as a null-terminated string).

  • [math-core-298] New function fill() fills the content of a variable (particularly vector-valued) from a given expression, as in V = vector10(); fill(V,k,k^2 + k + 2); (3-arguments version), or fill(V,u(-1,1)) (2-arguments version).

  • [math-core-298] New function repeat() iterates over the content of a variable, as in V = vector10(); repeat(10,k,print(k^2)); (3-arguments version), or repeat(10,print(u)) (2-arguments version).

  • [math-code-298] New function set(expr,'variable_name') sets the specified variable name with the value of expression expr (seen as a scalar value or a string).

  • [math-core-298] New functions deg2rad() and rad2deg() in math parser, to convert angles in degree from/to radians.

  • [math-core-298] New postfix operator ° converts degrees to radians, as in cos(45°), that is equivalent to cos(45*pi/180).

  • [math-core-298] New predefined constant value n which stands for the maximum number of threads a mathematical expression may use for its evaluation.

  • [core-298] When loading a .png or .tiff file, the bit depth of the input image (8, 16 or 32) is now returned to the status.

  • [core-298] Added new ‘string prepend operator’ that can be used to update variables, as in str=foo str..=before_ that is equivalent to str=before_foo.

Improvements / Modifications:

  • [stdlib-298] Command apply_curve: recoded to manage any kind of value ranges.

  • [math-core-298] Function store() is now able to store an input vector as an image of any size (it just pads with zeros in case the requested size is larger than the vector’s size).

  • [math-core-298] Improved JIT compiler to avoid unnecessary copy of memory blocks when initializing variables. As a result, complex math expressions requires less memory to be evaluated (and less bytecode instructions, so it’s probably slightly faster).

  • [math-core-298] Function rot() : angle argument must be specified in radians now (use new postfix operator ° to specify angles in degrees).

  • [math_core-298] Function _(comment) (that does nothing) can now be followed by a value, without requiring a ; separator.

  • [core-298] webp images with alpha-channels now load as 4-channels images into G’MIC (was keeping only RGB channels before).

  • [core-298] Optimized the storage of global variables. This greatly improves speed of commands that use a lot of global variables (e.g. parse_gui).

  • [core-298] Optimized the resizing of images (with command resize) when moving average interpolation is used (typically for image downsizing). It now uses a multi-threaded approach.

  • [core-298] Command text now accepts an ‘empty’ string as a first argument.

  • [core-298] Commands convolve and correlate have been mostly recoded, leading to visible optimizations, particularly for large kernels (\approx +50% speed gain).

  • [web-298] Binary packages for Ubuntu 21.04 ‘Hirsute’ are now available.

Bug fixes:

  • [core-298] When forcing file format in input/output expressions, s.a. ext:filename, ext was not accepting numbers. This is fixed.

  • [core-298] Storage of image names in .gmz format could be wrong. Now fixed.

  • [core-298] Fix commands convolve and correlate when channel_mode==0 and when channel_mode==2 with small kernels (<=5).

  • [math-core-298] Fixed bug about thread number t that could sometimes take value 0 for two different threads.

  • [stdlib-298] Fixed morph_rbf: old version of resize was used instead of resize_as_image.

  • [stdlib-298] Fixed help: when two commands had the same name, the help displayed for that command was not corresponding to the command with the higher priority.


From 2.9.6 to 2.9.7

New features:

  • [gmic-qt-297] New filter Light & Shadows / Guided Light Rays renders light rays, guided by a shape, drawn on a top transparent layer by the user.

  • [gmic-qt-297] New filter Light & Shadows / Equalize Light is a filter that proposes different ways to equalize light changes in an image.

  • [gmic-qt-297] New filter Rendering / Sine Curve, a very versatile filter to render 2D/3D sinusoidal curves, with a lot of tunable parameters.

Improvements / Modifications:

  • [gmic-qt-297] Filter Artistic / Stylize has 6 new predefined styles, provided by Christine Garner, which simulates different drawing styles (pencils,pastel,charcoal).

  • [gmic-qt-297] Work from Jan Tojnar allow to compile the G’MIC-Qt plug-in for the latest development version v.2.99 of GIMP.

  • [gmic-qt-297] For Windows users : plug-in now works with GIMP 2.10.24. The new GIMP release introduced upgraded dll that were causing issues with our plug-in binary.

  • [gmic-qt-297] For Windows users: provided archives now include an additional styles/ folder that avoid the G’MIC-Qt plug-in to look like a Windows95 application.

  • [core-297] Added input option that sets the resolution of the rendering when loading a .pdf file as a bitmap image.

  • [core-297] Added function to load .heic and .avif files (based on the use of libheif). This is not enabled by default. Thanks to Lukas Rusak for this nice contribution.

  • [core-297] Remove the default dependency of the project on the OpenCV library, for the CLI tool gmic. OpenCV is a monster library that requires a lot of external libraries (add more than 150 library dependencies to the executable gmic, on my Ubuntu), and which is used only by command camera and for saving/loading video files (considering there is however a fallback method when ffmpeg is installed). Not worth it.

  • [core-297] Force autostart command cli_start not to take arguments.

  • [core-297] Windows: Improve detection of external tools that could be used by G’MIC to improve I/O (e.g. ffmpeg).

  • [core-297] When saving a video file from odd-sized images: frames are automatically extended with one row and/or column to make sure they have an even number of rows/columns, avoiding error when saving the video file.

  • [stdlib-297] Re-implementation of the G’MIC Markdown engine, from scratch (faster, and now have a syntax closer to “usual” markdown). See what syntax this Markdown engine accepts here: G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - G'MIC Markdown

  • [stdlib-297] Help displayed on terminal now takes into account the number of columns of the terminal, to expand as much as possible.

  • [web-297] Added “latest dev” links in download page, to let users download the binaries corresponding to the latest development version of G’MIC. We hope we’ll get more feedback and bug report from users, to improve software development.

  • [web-297] Stop releasing packages for Debian8 and Windows/GIMP2.8 from the G’MIC download web page.

Bug fixes:

  • [core-297] Fix rendering bug when rendering out-of-screen triangles with z-buffer. Had an impact on the rendering of 3d objects (command object3d).

  • [math-core-297] Fixed potential wrong characters returned by function get() when retrieving a G’MIC variable as a string.

  • [stdlib-297] As usual, a lot of small bugfixes in the G’MIC standard library.


From 2.9.5 to 2.9.6

Bug fixes:

  • [gmic-qt-296] Fix bug that prevented users getting filter updates if their account names have accentuated characters in it (wrong handling of UTF-8 string that describe %APPDATA%).

From 2.9.4 to 2.9.5

New features:

  • [gmic-qt-295] G’MIC-Qt plug-in has now a 8bf interface, thanks to @PDN_GMIC. It can be run now in Photoshop / PaintShop Pro / Photoline / Affinity Photo and theoretically any software that supports 8bf plug-ins.

  • [gmic-qt-295] New button “Copy G’MIC Command to Clipboard” added, to make it easier getting the G’MIC command line corresponding to the applied filter.

  • [gmic-qt-295] New filter Artistic / Ghost creates a ghot effect from an input image.

  • [gmic-qt-295] New filter Colors / Tune HSV Colors allows to finely remap HSV basis colors acording to the user’s settings. Use complex CLUT reconstruction internally.

  • [gmic-qt-295] New filter "About/What’s New? " shows recent modifications of the plug-in filters (new or removed).

  • [core-295] New command output_obj that saves a 3D object into a Wavefront .obj file (something that Blender can import easily).

  • [core-295] Input/output of .raw, .cimg and .cimgz data files now accept bool as a possible type. In that case, the image data are stored using a bitwise format.

  • [math-core-295] New function addr(expr) returns the internal pointer address to the specified expression expr.

Improvements / Modifications:

  • [core-295] Command interpreter has been slightly optimized:

    • Debug info are not included by default anymore when reading a command file;
    • Checking the validity of the interpreter state is now done only in debug mode.
    • Static analyzer determines if item substitution can be skipped for some items.
    • Added more memory slots to store variables, leading to less string comparisons when accessing a variable value, in case many variables are defined.
  • [core-295] Native commands that define default arguments now accepts , as an argument (just as with custom commands).

  • [core-295] Command split3d has a different argument full_split which allows to enable splitting of 3D object primitives as single images in the resulting list.

  • [core-295] File options, if any specified, are now passed to custom commands input_ext and output_ext.

  • [core-295] New pre-defined variables $_os, $_flags, $_pixeltype give additional information on G’MIC interpreter and its running environment.

  • [stdlib-295] Commands replace_str and replace_seq slightly optimized.

Bug fixes:

  • [stdlib-295] Command display: Fix “shaking aspect ratio” bug happening when visualizing small images.

  • [math-core-295] Fixed user assignment of reserved variable in.

  • [math-core-295] Fixed wrong behavior of expression v[ind] = value, when v was a pre-defined variable (as ia, ic, in, …).

  • [core-295] Command svd: check that specified selected images are indeed matrices (no depth or multiple channels).


From 2.9.3 to 2.9.4

Improvements / Modifications:

  • [math-core-294] Function sort() can be now applied only on a subset of the input vector.

  • [core-294] Avoid compilation warning in function CImgList<T>::font(), with g++ >=v.10.

Bug fixes:

  • [core-294] Fix invalid memory read that could happen in function gmic::add_commands().

  • [core-294] Fix invalid memory read that could happen in command uncommand.

  • [core-294] Fix null pointer indirection that could happen in function gmic::run().


From 2.9.2 to 2.9.3

New features:

  • [gmic-qt-293] New filter Patterns / Random Pattern renders an image containing a random pattern, based on a random complex-valued function generator. Associated command random_pattern has been added in the G’MIC stdlib as well.

  • [gmic-qt-293] New filter Degradations / Rebuild From Blocs. It subdivides an image into blocs, and replace each bloc by the most similar bloc found in the set of other blocs.

  • [gmic-qt-293] New filter: Degradations / Blur [Multidirectional].

  • [gmic-qt_293] New translation system has been set up to allow translations of all filter widgets, rather than just the interface widgets.

  • [stdlib-293] New command display_camera (shortcut: dc) opens a simple interactive webcam viewer.

  • [math-core-293] New function expr('formula',_w,_h,_d,_s) outputs a vector of size w*h*d*s with values generated from the specified formula, as if one were filling an image with dimensions (w,h,d,s).

  • [math-core-293] New function get('varname',_size) returns the value of the specified variable, as a vector of size values, or as a scalar (if size is zero, or not specified).

  • [math-core-293] New function arg0() which is basically the same as arg() but with the argument index starting from 0 rather than 1.

  • [stdlib-293] New command parse_cli is a parser of .gmic files that extracts the description of the #@cli commands and outputs them in various formats.

  • [stdlib-293] New documentation generator implemented. Reference documentation is more flexible and can be now written with a light Markdown-like syntax (gmd, for G’MIC Markdown). New commands to convert gmd to html or ascii outputs have been set up.

  • [web-293] Web pages of the project have been improved. New command reference pages have been set up.

Improvements / Modifications:

  • [gmic-qt-293] Default choice for confirmation dialog appearing when suppressing a Fave filter is now set to Yes.

  • [core-293] External calls to ImageMagick’s convert are better managed on Windows, when filename or path contain spaces or UTF-8 characters.

  • [core-293] Command text : improvement of character spacing rules.

  • [core-293] Command resize: Argument list as [image],_interpolation,_boundary_conditions,_ax,_ay,_az,_ac is not permitted anymore, because it can be ambiguous compared to [image],_height,_depth,_spectrum,_interpolation,_boundary_conditions,_ax,_ay,_az,_ac. New command resize_as_image (eq. to ri) replaces the use of the deprecated argument list.

  • [core-293] Revert back on the behavior of commands discard and split when invoked with a list of values as the argument (i.e no specified axis). They don’t try to preserve the geometry of the input images anymore (this was creating annoying discontinuities in the behavior of these commands).

  • [math-core-293] Function get() has now an additional option to retrieve the variable value as a string rather than as a value or a set of values.

  • [math-core-293] Complex functions cabs(), cconj(), carg(), ccos(), csin(), ctan(), cexp(), clog(), ccosh(), csinh() and ctanh() now accepts scalar-valued arguments (and still returns complex numbers, i.e. vector2).

  • [stdlib-293] Command convolve_fft now accepts an optional boundary_condition argument.

  • [compiling-293] Compilation environment on Windows has been rebuilt from scratch. It now uses a recent version of the g++ compiler (and 3rd-party libs), and Link-Time Optimization is now enabled when compiling the G’MIC binaries.

Bugfix:

  • Command +e and +warn: Avoid first undesired line-feed character put on stdout.

  • Command convolve_fft has been recoded and is more precise and fast now.

  • Fixed small bug in scope management that made some specific sequences of flow commands not working as expected.


From 2.9.1 to 2.9.2

New features:

  • [gmic-qt-292] New plug-in filter Artistic / Doodle creates doodles from input photographs.

doodling1

  • [core-292] New native command mproj (stands for matrix projection) computes the projection of a matrix into a prescribed dictionary (defined as another matrix), with the choice of various projection methods : ortho-projection, matching pursuit, and orthogonal matching pursuit. Useful stuff for sparse dictionary learning. Math evaluator gets an equivalent mproj() function as well.

  • [math-core-292] New pre-defined variables in and in#ind return the L2-norm of respectively current image and image #ind, viewed as vectors or matrices (in that case, the Frobenius norm). Corresponding function in(_#ind) does the same for images with dynamic content (e.g. images under modification).

  • [stdlib-292] New commands xyz2jzazbz, rgb2jzazbz, jzazbz2xyz and jzazbz2rgb convert RGB or XYZ colors to the Jzazbz colorspace (and vice-versa). Code for these commands has been borrowed from this page by Alan Gibson (@snibgo).

Improvements / Modifications:

  • [core-292] Remove support for deprecated double-hyphen prefix (--command). Use +command instead.

  • [core-292] A few internal functions for matrix calculus have been better parallelized, when applied on large matrices (multiplication, norm, dot product, …).

  • [core-292] Command invert accepts an optional argument to choose between different solver for matrix inversion (can be 0=SVD or 1=LU). SVD solver is slower for large matrices, but less numerically instable. Math evaluator functions invert() and pseudoinvert() also gets this optional argument.

  • [core-292] Commands fill and eval better manage auto- or forced parallelization when image has a few columns.

  • [core-292] Commands solve, invert, svd, trisolve and blur : use double precision for computation.

  • [core-292] Command object3d: Add modification in a 3D object format to define a perfect sphere primitive from a pair (center,point), rather than specifying it only with its diameter (point1,point2).

  • [core-292] Command +echo is now implemented as a native command (faster).

  • [core-292] Command echo better manages messages starting with CR character.

  • [core-292] Commands discard and split : When possible, preserve principal axis of processed images.

  • [core-292] Command label: Change output behavior in order to manage multi-channels input images, and output always a single-channel label image even when a multi-spectral input image is given.

  • [core-292] Command label: New argument to choose between L1 and L2-norms for tolerance comparisons.

  • [math-core-292] Function transp(), inv() and pseudoinv() have been renamed respectively as transpose(), invert() and pseudoinvert() to be more coherent with the name of the corresponding pipeline commands.

  • [stdlib-292] Remove useless command unrepeat (eq. to discard without arguments).

  • [stdlib-292] Add illuminant E as a possible choice for color conversion commands involving the XYZ colorspace. Set it as default illuminant when no explicit illuminant is specified.

  • [install-292] Ubuntu/Debian packages provided on the G’MIC website now add an entry to the Desktop menu with the stand-alone version of G’MIC-Qt and ZArt.

Bugfix:

  • [core-292] Math evaluator: Fix possibly wrong pointer in call to delete.

  • [core-292] Command solve: Fix compilation issue when Lapack support is enabled.

  • [stdlib-292] Filter Apply External CLUT: Implement Strength control.

  • [stdlib-292] Fix command colormap, for some degenerated cases.

  • [gmic-qt_292] Fix possible canvas shift when applying a filter inside a selection.


From 2.9.0 to 2.9.1

New features:

  • [gimp-qt-291] New filters Various / Import RGB-565 File and Various / Export RGB-565 File allows to import/export data from raw RGB-565 files.

rgb565_000001

  • [gimp-qt-291] New API feature allowing to hide unused items or comboboxes for hosts that don’t implement all the plug-in features.

  • [core-291] New command remove_named (shortcut rmn) removes images with specified names from the list (equivalent to rm[${"-nmd name"}]).

  • [core-291] Interactive 3D viewer (command display3d, a.k.a d3d) has been recoded from scratch as a custom command.

  • [core-291] New substituting expression {*,f} returns 0 or 1 whether the display window is in fullscreen mode or not.

  • [math-core-291] New function swap(a,b), swaps the values of given arguments a and b.

  • [math-core-291] New functions vargkth(), vargmin(), vargmax(), vargminabs(), vargmaxabs(), vavg(), vkth(), vmin(), vmax(), vminabs(), vmaxabs(), vmed(), vprod(), vstd(), vsum() and vvar() are similar to the functions whose names do not start with v, but works with vector-valued arguments (and return a vector-valued result).

  • [math_core-291] New function string() creates a string from a list of arguments (similar to echo() but outputs a vector).

  • [stdlib]-291] New command rbf computes interpolated 1D/2D/3D functions from a set of sparse keypoints.

  • [stdlib-291] New command percentile applies a “percentile filter” to selected image (mix between averaging and dilate/erode/median).

  • [stdlib-291] New commands input_565 and output_565 allows to read/write images files in raw RGB565 format.

  • [stdlib-291] New command is_macos returns 1 or 0 whether G’MIC is run on MacOS or not.

Improvements:

  • [core-291] Commands solve and invert now runs in parallel when possible (also apply for functions solve() and inv() in the math parser).

  • [core-291] Special input string (value1{,|;|/|^}value2{,|;|/|^}...[:{x|y|z|c|,|;|/|^}]) has now an optional :axis option to unroll the image values along a specified axis.

  • [core-291] Slightly improved the memory footprint of the G’MIC interpreter. A few memory allocations are avoided when not necessary.

  • [core-291] Variable font size are now used in interactive viewer when displaying a list of image (command display), in order to make it readable on HDPI screens.

  • [core-291] Optimize commands isoline3d and isosurface3d, by lowering the number of grid points evaluations.

  • [core-291] Better support UTF-8 paths and filenames on Windows.

  • [core-291] Command uncommand now has a shortcut name um.

  • [math_core-291] Add a pre-optimization step that detects common simple expressions for speeding up evaluation for these cases.

  • [math_core-291] Change encoding of unsigned int values in functions f2ui() and ui2f(), so that no subnormal float numbers are used for the encoding. This avoids issues for commands dealing with large 3D objects, when aggressive optimization flags are used for compiling gmic (which is the case by default).

  • [math_core-291] Improve syntax for accessing a vector component, where the left side of the [] operator is complex. For instance, I[#0,off][2] is now recognized (needed parentheses before, i.e. (I[#0,off])[2]).

  • [stdlib-291] Command display2d: font with adaptive size is now displayed in order to deal with hidpi screens.

  • [stdlib-291] Command display2d: hexadecimal display of color values is now enabled for 1,2,3,4-channel images (not just 3 as before).

  • [stdlib-291] Command sort_list has been optimized when used with the n type of sorting.

Bugfix:

  • [core-291] Fix a few (critical) OpenMP issues with clang++ compiler.

  • [core-291] Fix possible buffer overflow happening when reading some malformed .bmp files.

  • [core-291] Substituting expressions s.a. ${"command"} now checks that the provided command does not change the number of images in the list, and throws an error otherwise (was possibly leading to segfaults, e.g. sp lena +b 10 d ${"max u 10"} ).

  • [core-291] Fix argmax command and argmax() function in math parser (regressions introduced in 2.9.0).

  • [math_core-291] Fix modulo function when called with inf or nan values.

  • [math_core-291] Fix function isint() when passing NaN or inf values.

  • [stdlib-291] Fix filter Artistic / Cutout (regression of 2.9.0).

4 Likes

– FYI, Apple dropped the X. It is now macOS.
display0 no longer shows stats like other display modes.
sqr() function missing in docs.

Hello everyone

I was replying to a post on this forum about an user request to reduce red-eyes:

In order to help this user I have downloaded from Internet a picture with the problem (red-eyes, I mean) :slight_smile:
I have discovered that with this very particular PNG image the G’MIC 2.9 GUIs is not available with GIMP 2.10.18 (Windows 10 - 64 bit). It is greyed out and you can not click on it.

The 2.9 CLI version of G’MIC works fine with this same image. Therefore I don’t know whether it is a “bug” of GIMP or G’mic (Qt graphical version…).
As reported this problem occurs only with this png file. The other PNGs images work fine in that the GUIs is always available with GIMP.
In addition, if I save this same image as jpeg the G’MIC plugin is working on GIMP.

Here is the image:

RedEye1

This .png is not in RGB mode, but uses indexed colors. In GIMP, go to ‘Image → Mode’ and select ‘RGB’ to be able to open the G’MIC plug-in.

1 Like

Hello @David_Tschumperle

This .png is not in RGB mode, but uses indexed colors.

I would have never thought about that :slight_smile:

Just tried again your suggestion. It works great now!
Thanks a lot indeed!

Hi, nice progress with display3d as custom command. Still actually, on my Mac I get an error

gmic osteo elevation3d 0.2
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Load osteoblast nucleus example image
[gmic]-1./ Build 3D elevation of image [0], with elevation factor 0.2.
[gmic]-1./ Display 3D object [0] = ‘osteo’ (16384 vertices, 16384 primitives).
[gmic] *** Error in ./display3d/_display3d/(…)/*if/boundingbox3d/*repeat/*local/ *** Item substitution ‘{o3d.>0}’: Unrecognized item ‘o3d.’ in expression ‘o3d.>0…’.

It disappears with
gmic m work/src/gmic/src/gmic_stdlib.gmic osteo elevation3d 0.2

There is seemingly a mismatch between cmic_stdlib.gmic and update291.gmic

Indeed, I’ve just noticed that boundingbox3d was already defined as a command in jerom_boulanger.gmic (from @Jerome_Boulanger , with a different way of using it.
I’ll see what I can do to fix that.

Very good. Still I have a problem to add a background image. I tried

gmic m work/src/gmic/src/gmic_stdlib.gmic osteo elevation3d. 0.2 follic d3d… .

Are there any conditions for the background image?

Actually, I didn’t take care of the previous list of possible arguments for d3d.
I’ll manage them ASAP.

Bug or misunderstanding?

gmic (-28) (-14) +argmin +argmax.. # unexpected (argmax!=1)
gmic (28) (14) +argmin +argmax.. # expected

gmic (-28) (-14) +argmin +argmax.. # unexpected (argmax!=1)
  • The first +argmin is equivalent to +argmin[0,1] and returns then (0) as -28<-14.
  • You have then a list of 3 images : (-28), (-14) and (0).
  • The +argmax.. is then equivalent to +argmax[1] and returns (0) (obviously , there is only a single image in your selection, so 0 is the only possible value that can be returned by your argmax).

I’m not sure what you wanted to compute with your argmax, actually.

Typo. The same result comes from

gmic (-28) (-14) +argmin +argmax[0,1] e[] {2,i},{3,i} q # 0,0

That is more unexpected indeed. Will investigate this tonight :slight_smile:

That was a bug indeed! I’ve fixed it.
I guess nobody should use argmax until the next release 2.9.1… :frowning:

I have a large list of images. If errors appear anywhere in this list it is quite difficult to trace that. Especially if the error appears only inside the long list processing and not on the finally isolated image. In fact I had a crash of such sort setting a parameter with or without “%” and could not prepare information to trace that bug. Hence I could not send a bug report.

I think some sort of break, debug or stop/continue function inside the actual environment allowing to insert and process additional gmic commands would be very helpful.

I don’t really understand what you mean here. Do you have a simple example of code that reproduce your issue?

That is just the problem. I had some 300 images calculated in a sequence and one, say the 170th delivered a crash. However trying this image alone with the same sequence, there was none. I could not isolate a small piece of code with the issue.

What kind of crash ? Did you get any error message ? What was the command applied ?

I cannot reproduce it now!

Message was

[gmic] G’MIC encountered a fatal error. Please submit a bug report, at: https://github.com/dtschump/gmic/issues

The last image processed was an extracted region, actually the “L” channel from “rgb2lch”,

[14] = ‘trans_c1’:

size = (1,367,1,1) [1468 b of floats].

data = (94.0206;94.1174;93.8031;94.2977;92.6694;91.849;92.816;93.6015;92.8939;91.4756;91.1697;91.581;(…),92.3684;94.1638;92.2279;89.4571;89.2402;91.0791;92.9231;91.7553;90.0086;90.1253;91.3168;93.0702).

min = 81.0405, max = 99.4728, mean = 92.1273, std = 3.58977, coords_min = (0,169,0,0), coords_max = (0,284,0,0).

and the command was “karo_extinction. ,” which defaults to 100%

The crash disappeared with “karo_extinction. 100”

In the meanwhile (continued work), there is no crash anymore neither with 100% nor 100

Sorry not to be more specific!

The first occurrence was:

/Users/karo $ gmic bh_praep ,,,,269
[gmic]-0./ Start G’MIC interpreter.

[gmic] G’MIC encountered a fatal error. Please submit a bug report, at: Issues · dtschump/gmic · GitHub

“bh_praep” is a custom function from me, processing a set of images with lots of called other functions.