Release of G'MIC 3.2

The weird exception is because I thought it would be expected for a coder to assume empty string means no name, and therefore only named images are affected.

Now coming to think of it, my solution is to use nested keep. That would target only images that I want affected. Like this:

imgs={$!}
$_persistent
keep_named[$imgs--1]

Also, I been wondering something though I don’t expect much out of it: Would the paper Efficient implementation of the smalltalk-80 system be applicable to G’MIC? JavaScript Core8 use it even though Python and others doesn’t. The paper is about technique used for interpretative language to make it almost as fast as compiled C language.

My feeling (as a coder) is a bit different, I would rather say : Every image has a name, which can be empty.

No idea, sorry.

Here’s another idea for _persistent. Can we have a command that basically adds a image into stored list, and if it already exist, it replaces all of them instead, and they’re based on names? I’m currently working on a solution to work with multiple images and whether these images are kept depends on the conditions applied. I will show a solution when I figure that out.

This looks like a very specific feature to me. What is the general use of such a command?

To use a group of images as arguments.

Think of rep_photomosaic, but rewriting the gui version and using _persistent in it. In there, you have large set of image which is used as base for making smaller images, you have the palette to define colors which then will be used to select smaller image to build up bigger image. So, essentially you have different groups of images in $_persistent to work with if you want to optimize it. That is what I’m planning to do after finishing up my recent work.

Is there an additive mode for draw() in math parser, or something equivalent? It seems slow to have to explicitly read and add…

Ask, and you shall receive:

$ shape_circle 50 512,512 eval img=crop(#-2);draw_img(x,y)=draw(#-1,img,x,y,0,0,50,50,1,1,-1);draw_img(100,100);draw_img(120,120);

See that -1 in draw(x,y)? That -1 is on opacity part of draw. That denotes to add instead.

1 Like

Yes, in almost all G’MIC drawing functions, an opacity of -1 means “add”.
More generally, an opacity of -X means: Background + X*Drawn_object.

Another idea:

A command to convert a image into dynamic image. You can actually do that manually now. This means to append 0,and size of array onto image, and making it into vertical form, then it can be modified within math parser.

This does the job for image [-1]:

  r. 1,{whd},1,100%,-1 ({h}) a[-2,-1] y

Honestly, as this is quite “trivial” to write and useful in only quite a few situations, I’m not sure adding a dedicated command for that is really necessary.

Hmm, yes, agreed it’s trivial. I bookmarked the post anyway.

That being said, there’s something that needs to be said about the clipboard feature in GUI. In my last two GUI filters, it makes no sense to use the clipboard feature as the copied code would not run on anywhere else. _persistent also complicates that issue since other place has no access to _persistent data.

If you were to use the clipboard feature on either Premade Palette or Lavander Binary Map, you’d note why they wouldn’t work. The second one is mainly because of the source code text provided within the GUI code.

Maybe a new command only accessible by the GUI to make custom clipboard code would solve this problem?

Some news from the developer’s corner:

This week, I’ve been able to work a lot on the G’MIC source code, and so far, I’m quite happy with the results:

  • I’ve done some cool optimizations/code cleaning on the G’MIC interpreter code.
  • I’ve added interesting functions to the math evaluator, and improved the expression parser.
  • I’ve improved the way image copies are named when performing G’MIC commands.
  • I’ve slightly improved the integrated neural network library.
  • I’ve corrected a lot of bugs :slight_smile:
  • I’ve posted binaries for version 3.1.6_pre. Right now, I think we are not so far away from a new release.

Current work in progress:

  • I’m currently trying to set up a “light” convolutional neural network dedicated to image upsampling (x3 upscale). Today, I’ve started getting non-weird results, so I’m quite confident this is going somewhere. Hopefully, I’ll be able to create a command like upscale_cnn and its associated plug-in filter soon!

Fingers crossed :crossed_fingers:

4 Likes

Argh, regression found in 3.1.6_pre posted two days ago.
Fixed, building new packages for 3.1.6_pre!

  • 2022/08/31: Version 3.1.6 released. Binary packages on their way.
2 Likes

I can’t install the usual way 3.1.6 for 2.99.12 ? I have this version https://github.com/GreycLab/gmic-community/releases/download/GMIC-3.1.6/gmic_3.1.6_gimp-2.99_Win64.7z

Bonjour,

3.1.6 works on the GIMP-2.99.10 and GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP :

DOES NOT WORK on the Gimp-2.99.12 versions (Gimp.org and Gimpeval) following the API changes.

3.1.6 works on the GIMP-2.99.10 and GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP :

Still is’t not there. How do you install it? I can’t install it the usual way.

Also, I forgot to say that filter updates are now disabled for G’MIC <=3.1.5.
Please update to 3.1.6 if you want to get the next filter updates.

@hover
Bonjour,

1 - Download and extract GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP
https://www.aljacom.com/~gimp/GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP.7z

2 - Download and extract gmic_3.1.6_gimp-2.99_Win64.7z
https://github.com/GreycLab/gmic-community/releases/download/GMIC-3.1.6/gmic_3.1.6_gimp-2.99_Win64.7z

3 - Copy or cut all the contents of the \gmic_3.1.6_gimp-2.99_Win64\gimp-2.99-64bit\gmic_gimp_qt

4 - Paste in directory \GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP\Preferences\plug-ins\gmic_gimp_qt
by deleting the existing content

5 - Start gimp-2.99.13 by clicking on the executable \GimpEval-2.99.13-64bits-Win_GMIC-QT-GIMP\GIMP.exe

Now it works! Thank you samj!
I’ve set to different folder and used Prefrences path but it didn’t work before.

Could you make next GMIC version 3.1.7 to work on standard 2.99.12 ?