On the road to 3.2

This is the changelog for the G’MIC software, until it reaches target version 3.2.

It lists all new features and changes done since the latest stable version 3.1.0.

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 ^


From 3.1.6 to 3.2.0

New features:

  • [gmic-qt-320] Stand-alone version of G’MIC-Qt gets new option --layers to specify that multiple input images must be used as layers for the selected filters (rather than applying the filter image by image).

  • [gmic-stdlib-320] New command narg returns the number of passed arguments.

Improvements / Changes:

  • [gmic-core-320] Command camera now throws an exception if a camera frame could not be captured.

  • [gmic-core-320] Merge commands and math parser functions invert and pseudoinvert for matrix inversion.

  • [gmic-math-core-320] Add new option use_LU to command solve and math function solve().

  • [gmic-math-core-320] Functions stov() and vtos() renamed s2v() and v2s() respectively.

Bug fixes:

  • [gmic-qt-320] Fix saving output file in .png format with stand-alone version.

From 3.1.5 to 3.1.6

New features:

  • [gmic-qt-316] New filter Rendering / Algorithm A, is a G’MIC conversion of an interesting idea proposed by Memo Akten on Twitter. It creates abstract “Mondrian-like” illustrations.

  • [gmic-qt-316] New filter Arrays & Tiles / Shuffle Patches, allow to reconstruct images from shuffling the initial image patches, with different reconstruction options.


  • [math-core-316] New function cov(A,B,_avgA,_avgB) computes the covariance estimation from two input vectors.

  • [math-core-316] New function mse(A,B) computes the mean-squared error between two input vectors.

  • [math-core-316] New function da_freeze(_#ind) convert a dynamic array as a 1-column image of size 1 x da_size(_#ind) x 1x100%.

  • [math-core-316] New predefined variable id stands for the standard deviation of the current image (eq. to sqrt(iv)).

  • [stdlib-316] New macro do_intersect(p0x,p0y,p1x,p1y,q0x,q0y,q1x,q1y) in math_lib: returns 0 (false) or 1 (true) whether the 2D segments [p0,p1] and [q0,q1] intersect or not.

  • [stdlib-316] New command ssim, computes the Structural Similarity Index Measure, as described in the paper: Wang, Zhou, et al., “Image quality assessment: from error visibility to structural similarity.”, in IEEE transactions on image processing 13.4 (2004): 600-612.

  • [stdlib-316] New commands mse_matrix, psnr_matrix and ssim_matrix return the matrix of resp. MSE, PSNR and SSIM values between images of the selection.

  • [stdlib-316] New command keep_named (shortcut kn) keeps only images with specific name in the image list (opposite of remove_named).

  • [stdlib-316] New command img2patches and patches2img: Command img2patches decomposes an image into a set of (possibly overlapping) patches, stacked along the z-axis. Command patch2img does the opposite. It reconstructs an image from its patch representation.

Improvements / Changes:


From 3.1.4 to 3.1.5

New features:

  • [gmic-qt-315] Filter Colors / Vibrance can be used to make your colors more saturated (filter done by @age).

  • [gmic-qt-315] Filter Colors / YCH Vibrance can be used to make your colors more saturated (works in th YCH colorspace). Filter done by @Reptorian .

Improvements / ameliorations:

  • [core-315] Improved the sharing of abort pointers between multiple parallel instances of G’MIC interpreters.

  • [gmic-qt-315] Make G’MIC-Qt compilation independent on G’MIC source code, when dynamic linking is set. This should ease the packaging of G’MIC into different components (requested by the Krita folks).

Bug fixes:

  • [core-315] Fix possible double memory free, when exiting a filter.

From 3.1.3 to 3.1.4

Improvements / Modifications:

  • [gmic-qt-314] Filter 3D Mesh: Add rendering option Bounding Box.

Bug fixes:

  • [core-314] Fix regression in 3.1.3 that causes certain +command to be much slower than in 3.1.2.

  • [gmic-qt-314] Fix encoding issue for filters returning encoded text in status, to modify input parameters.

  • [gmic-qt-314] Disable entirely the log output when verbosity is set to none.


From 3.1.2 to 3.1.3

New features:

  • [gmic-qt-313] New filter Rendering / 3D Mesh renders a 3D object on a new transparent layer, from a .obj (Wavefront) or .off filename.

  • [gmic-qt-313] New system for storing persistent data between successive calls of a filter, through new reserved variable $_persistent. Particularly useful for filter that input large external data files (e.g. that does not have to be reloaded each time the preview is updated).

  • [stdlib-313] New command eye inserts an identity matrix of specified size at the end of the image list.

  • [stdlib-313] New command identity inserts an identity map with specified dimensions at the end of the image list.

  • [stdlib-313] New command surfels3d converts an image containing a binary shape as a 3D object containing 3D surfels (works for 2D images too).

  • [stdlin-313] New command input_obj implements a 3D mesh loader, in the .obj file format (Wavefront) (beware: not all .obj features implemented!).

gmic_000001

Improvements / Modifications:

  • [gmic_qt-313] Filter labels are now selectable and can be copy/pasted if necessary.
  • [core-313] Command warp: Make default value = 0 for argument 'boundary_conditions`.
  • [core-313] Optimize syntax +command for some arithmetic commands (e.g. sqr, sqrt, cos, …).
  • [core-313] Improve behavior of math function get(). Do not throw exceptions anymore.
  • [stdlin-313] Improve command output_obj : export face transparency; less memory used to export RGB materials.
  • [package-313] Remove packages for versions of Debian and Ubuntu that are not supported anymore (Debian 9, Ubuntu 19.04, 19.10, 20.10, 21.04).

Bug fixes:

  • [core-313] Fix macro value of cimg_max_buf_size that causes crash on 32-bits arch.
  • [core-313] Command rotate: fix argument parsing bug, happening with 3D rotations, when last argument center_z has a % suffix.
  • [core-313] Fix variable assignment operators >>= and <<=.
  • [core-313] Fix arithmetic variable assignment with rounding (e.g. x:=_pi).
  • [stdlib-313] Fix command parse_cli when run without input data.
  • [stdlib-313] Fix command primitives3d for large 3d objects.

From 3.1.1 to 3.1.2

Bug fixes:

  • [core-312] Fix bug in commands break and continue when executed in a loop that is the last code block of a command.

From 3.1.0 to 3.1.1

New features:

  • [gmic-qt-311] New filter Colors / Apply From CLUT Set allows to apply a CLUT on an image, from a compressed CLUT set stored as a custom .gmz file.

Improvements / Modifications:

Bug fixes:

  • [gmic-qt-311] Fix management of “Faves” file on Windows, when the account name contains accentuated characters.

  • [core-311] Fix possible misinterpretation by the interpreter of arithmetic expression like ‘str1’==‘str2’, when used with the := assignment operator (commit #4200a80aae83b53d1a6d0e950f47e49601842d76)

  • [core-311] Fix blocking mutex when using nested run() in mathematical expressions.

  • [core-311] Fix regression that happened in command input_flo between version 3.0.2 and 3.1.0 (wrong datatype name used).

2 Likes

Might want to add that blend has changed. Should we change the code on gmic-community with regard to blend?

blend has changed indeed. Old version was not accurate and even buggy in some cases (like blending a foreground wo/ alpha on top of a background w/ alpha).
The syntax of the new command is the same though, so changes shouldn’t be needed unless you were using blend in a way that exhibited the wrong behaviors.

Bonjour,

In the ‘new blend’ two modes are missing :

  • seamless
  • seamless_mixed

Fixed with: Command 'blend': Put back 'seamless' and 'seamless_mixed' modes. · dtschump/gmic@c05065d · GitHub

Merci :o)

Suggestion: Add new G’MIC-QT codes filters specifically for full-sized preview.

See gui_crop_preview , gui_resize_preview, gui_crop_resize_preview.

I was thinking of code[Global] and code[local], but I will see to that.

EDIT: Copying code[local], and then adding an asterisk works for me. Now, I can figure out how to do point-based crop.

And I figured it out:

 point_x,point_y:=cut([$1,$2],0,100)
 
 eval "
  points=[$point_x,$point_y]%;
  trim_out_width=min($_preview_width,w);
  trim_out_height=min($_preview_height,h);

  trimmed_width=w-trim_out_width;
  trimmed_height=h-trim_out_height;

  x0=int(trimmed_width*points[0]);
  y0=int(trimmed_height*points[1]);
  x1=x0+trim_out_width-1;
  y1=y0+trim_out_height-1;

  [x0,y0,x1,y1];"
  
  crop ${}

Hi, I used GMIC QT in krita and found a possible mistake. Amyspark said it was stipulated by GMIC internally, so I came here to give feedback.

The “HSV” mode of “channels to layers” can divide the layer into two parts, and use the “value” blending mode in krita for mixing. However, this result is different from the original figure. Instead, it is more correct to use “multiply”.
舒服垫 (artwork by 藤ちょこ)
Is this the wrong setting of blending mode or the wrong processing of channels? I remember that other software does not have “value” blending mode. Maybe just change the blending mode to “multiply”.

@TheTwo85737309 Welcome to the forum! Recently, there were changes to blend filters / commands that may improve things for you. I suggest you update G’MIC qt and then the filters so we can be on the same page.

Did you draw this image? If not, please give attribution.

I think the problem is related to the slight differences between how blending modes are implemented in the different hosts that support G’MIC-Qt.
When I’ve implemented this filter, I’ve tried it on GIMP and it gave the same kind of result with the “Value” mode, as implemented in GIMP then.

Anyway, I can still add a new option to HSV mode with the “Multiply” mode if needed.

I tested it in krita and gimp: most cases are the same, but krita changes saturation in some cases. This should be the reason why they are different. I think gimp is more correct. So I will also report to krita developers.

It may be more convenient to unify the blending mode of all softwares into “multiply”: otherwise, Photoshop, affinity photo and other software cannot find “value”
imagekrita
imagegimp

Looks like G’MIC ignores Alpha and for the most part it does. To my understanding Alpha is a big part of Krita but optional in GIMP.

I know this is pretty obscure request, but could it be possible to add a variable named 'color_restriction' to 'index', and what it does it attempt to limit to nearest colors of n size within palette?

See G’MIC exercise thread.

Two things to consider:

  • As you said, this looks like an “exotic” request, i.e. something that will be used only by you and maybe 1 or 2 other people in the whole G’MIC lifetime → this is not a good sign to ask for a feature integration in the G’MIC core :slight_smile:

  • Why not implementing it by yourself using the math parser ? This is totally doable as a custom command. For instance, a simplified version of index could be written as:

#@cli my_index : [palette]
my_index :
  pass$1 0
  foreach[^-1] {
    pass.
    [0],[0],[0],1,"
      RGB = I(#0);
      dR = crop(#1,0,0,0,0,w#1,1,1,1) - RGB[0];
      dG = crop(#1,0,0,0,1,w#1,1,1,1) - RGB[1];
      dB = crop(#1,0,0,0,2,w#1,1,1,1) - RGB[2];
      index = argmin(sqrt(dR^2 + dG^2 + dB^2));
    "
    k.
  }
  rm.

(it even runs in parallel).
Feel free to add whatever additional constraint you want on the computed index

Hello, I have one more thing. A dozen of us spent some time before making the Chinese translation of GMIC QT, which is roughly as shown in the figure below (Chinese + English). Can it be merged? In fact, my friend has submitted it before, but no one replied
Submission of Chinese translation documents by PTFish8 · Pull Request #127 · c-koi/gmic-qt (github.com)

2022/05/10: Release of version 3.1.1.

1 Like

New critical bug found tonight :frowning: Will release fix 3.1.2 tomorrow!

1 Like