On the road to 3.6

Here is the running changelog of the G’MIC project, until it reaches next major version 3.6.
It lists all changes made to the project since the latest stable release (3.5.0).

New features:

Version 3.5.4

  • [core-354] Start port of the CImgDisplay class to make G’MIC use the SDL3 library for displaying windows. Hopefully, this will enable future versions of G’MIC to natively use Wayland instead of X11. This is work-in-progress, so expect some (big) troubles when enabling it.

  • [math-core-354] Add function epoch(_year,_month,_day,_hour,_minute,_second) that returns Epoch (Unix time) corresponding to specified date.

  • [math-core-354] Add overloading of function swap() that allows to swap pixel values in images, with signature swap(#ind,pos0,pos1,_is_vector).

  • [math-core-354] Add function frac(x) that computes the fractional part of x (i.e. x - (int)x ).

  • [math-core-354] Add function wave(x,type) that defines periodic functions with various waveforms.


anim_waves-ezgif.com-optimize

Version 3.5.3

  • [gmic-qt-353] New filter Rendering / 2.5D Extrusion renders a fake 3D effect from an input binary shape.

  • [gmic-qt-353] New filter Rendering / Fluffy Cloud renders fluffy clouds!

  • [gmic-qt-353] New filter Deformations / Warp [RBF] lets you warp an image by moving anchor keypoints directly over the preview widget.

  • [stdlib-353] Add command at_curve, that extracts image pixels belonging to a spline curve passing through specified points (replace previous command at_line).

  • [stdlib-353] Add command resize_displacement, that uses a specific algorithm to upscale displacement maps, for patch-based image synthesis.

  • [web-353] We have now accounts on X and Bluesky in addition to Mastodon. Mastodon messages will be crossposted to our X and BlueSky accounts : https://x.com/gmic_eu and @gmic-eu.bsky.social on Bluesky .

Version 3.5.1

  • [math-core-351] Add function isfinite() that returns 0 or 1 whether the given argument is a finite number or not (i.e. not inf nor NaN).

  • [math-core-351] Add function isvar(varname) that returns 0 or 1 whether the given argument is the name of an already defined variable or not.

  • [math-core-351] Add function abscut(x,min,max,offset) that returns cut(abs(x) + offset,min,max)*sign(x) (see dedicated post to get an idea why).

  • [stdlib-351] Add command matchpatch_alt, a custom re-implementation of command matchpatch that is slower but easier to modify for computing custom correspondence maps between two images.

Improvements / Modifications:

Version 3.5.4

  • [math-core-354] Improve expression parsing to better detect items $> and $< (so that e.g. expression $<*2 does compile without parentheses, as in ($<)*2 ).

  • [core-354] Enter and Return key events can now be checked independently, when managing display windows.

  • [stdlib-354] Command plot: Add shortcuts CTRL+O and CTRL+S to save current instance and screenshot.

Version 3.5.3

  • [gmic-qt-353] Filter Rendering / Gradient [from line] has been upgraded to Gradient [from Curve] and is now able to extract color gradient from a cubic spline path (rather than just a straight line)

  • [core-353] Various code optimizations, to speed up string parsing and concatenation in the G’MIC interpreter.

  • [core-353] Commands erode, dilate, deform, spread now accepts arguments with a % suffix.

Version 3.5.1

  • [stdlib-351] Command scale2x_cnn: Implement downscaling fidelity constraint, so that a downscaled version of the upscaled image is closer to the input image.

  • [stdlib-351] Command denoise_cnn: Changed the network architecture to make it more controllable (add a user-defined parameter for noise level estimation).

  • [stdlib-351] Management of simultaneous neural networks has been improved in the nn_lib (ML library inside G’MIC). Some of the existing layers have been also improved.

Bugfix:

Version 3.5.3

  • [core-353] Fix command median when size=3 and selected image is a one-column vector.

  • [math-core-353] Fix function find() when first argument is an empty string (returns -1 rather than 0).

Version 3.5.2

  • [packages-352] Fix DLL issue with the G’MIC-Qt for GIMP.

Version 3.5.1

  • [math-core-351] Fix multi-threading issue when forcing the evaluation of math expressions in parallel for images that has less values than the number of threads (including empty images).

  • [math-core-351] Fix function v(a,b) that was always returning positive random values when a or b were negative.

  • [stdlib-351] Command display: Fix window title when displaying a single image that has been generated from a math expression.

4 Likes

2025/01/27: Release of G’MIC 3.5.1. :beers:

2 Likes

This is easy to make, but wouldn’t it be nice to have the option to assign dimensions instead of image index in o2c() and c2o()?

Unfortunately, a function like c2o(w,h,d,s,_x,_y,_z,_c,_boundary_conditions) would lead to possible ambiguities.
Example:

off1 = c2o(x,y,z,c,boundary); # 5 arguments, expecting result : x + y*w#-1 + z*wh#-1 + c*whd#-1
off2 = c2o(w,h,d,s,x); # Also 5 arguments, expecting result : x

I have this problem with version 3.5.1,

Clicking Update Neural Network deleted the gmic_scale2x_cnn.gmz file from disk.

Same with Denoise[CNN]

What happens if you copy this file : https://gmic.eu/gmic_scale2x_cnn.gmz in your folder %APPDATA%/gmic ?

I downloaded the indicated file (although it is the same as in gmic_3.5.1_gimp2.10_win64.zip) and placed it in:
…\AppData\Roaming\gmic
Nothing has changed - the file has been deleted again as I described previously.

@MrQ OK, so it seems to be a problem of missing .dll in the G’MIC plug-in folder.
I’m currently building new packages for version 3.5.2_pre, it should be ready in one hour or so (not available yet!).
Could you please check and tell me if that fixes your issue ?
Thanks!

Prerelease version
gmic_gimp2.10_win64.zip 2025-01-28 16:00 48M
and
gmic_gimp3.0_win64.zip 2025-01-28 16:01 48M
works as expected.

Thank you very much.

1 Like

Hmm, I see. I think I will try porting my combinatorics commands into something like math_lib. The code used within rep_cartesian_product commands can do what I want anyway.

By the way, a little trick I forgot to compute c2o() with other w,h,d,s:

foo :
  100,100,1,3,"
    begin(V = [ 1,w,w*h,w*h*d ]);
    offset = dot([ x,y,z,c ],V);
  "

  100,100,1,3,"c2o(x,y,z,c)"
1 Like

2025/01/28: Release of G’MIC 3.5.2 (solve DLL problems on Windows).

I downloaded, you can’t start Windows 11

Something is wrong with the “Contrast Swiss Mask” filter.

The current code is:

fx_contrast_swm :
foreach {
split_opacity l[0] {
+luminance to_rgb
b $1
if !$2 negate[1] fi
rv blend hardlight,$3
}
a c
}

It should be:

fx_contrast_swm :
foreach {
split_opacity l[0] {
+luminance to_rgb
b[1] $1
if !$2 negate[1] fi
rv blend hardlight,$3
}
a c
}

The mask should be blurred, not the original image.

Sounds reasonable, yes.

1 Like

On the other hand, G’mic 3.5.2 GMIC-Cli GMIC-QT6, GMIC-GIMP-QT6-3.0.0-RC2 Win 64 Compilé Avec Clang started immediately

  • 2025/03/07: Release of G’MIC 3.5.3.

3 Likes

For some reason, I feel tempted to add C++ 23 bit_width, bit_ceil, and bit_floor just because they’re more faster than int(log2()), and rol/ror is only used in a glitch filter which both form can be used in similar codes (not saying they’re removable because obviously they are used). Plus, code would look a slight more readable and faster with their existence as in less lines and brackets and less computation as log2 is expensive compared to those. Any thoughts on this, @David_Tschumperle?

Well, I suppose that if log2() is too expensive, it’s because you try to compute it for many values of an image ? If so, why not having a precalculated table (or at least a partial precalculated table) ?