On the road to G'MIC 3.4

This post lists all the changes/additions done to the G’MIC software, starting from the version 3.3.0, until we reach the next major release 3.4.0.
Most of these features are available in latest stable version of G’MIC (3.3.3) after a filter update ($ gmic update).

New features:

Version 3.3.5:

  • [stdlib-335] Command edgels has been recoded from scratch and can now return multiple lists of edgels, either starting from the same pixel, or from any shape pixel present in the image.

  • [stdlib-335] New command split_vector split an image into several parts, where specified vector is the separator.

  • [math-core-335] New function flood(_#ind,_x,_y,_z,_tolerance,_is_high_connectivity,_opacity,_color) performs a flood fill in image [ind] (or in default image selected if ind is not specified) with specified coordinates. This is the math evaluator analog to command flood.

Version 3.3.4:

  • [gmic-qt-334] Filter Rendering / Quick Copyright has been recoded from scratch, with lot of new options.

  • [gmic-qt-334] New filter Patterns / Random Rectangles creates a random partition of colored rectangles.

  • [stdlib-334] New command poincare_disk renders an image of the Poincaré disk, and its associated filter Deformations / Poincaré Disk.

  • [stdlib-334] New command count_colors returns the number of distinct colors used in selected images.

  • [gmic-qt-334] New filter Patterns / Reaction-Diffusion creates reaction-diffusion patterns.

  • [math-core-334] New function v(min,max,_include_min,_include_max) returns a random integer in specified range (similar to function u() but returns an integer).

  • [math-core-334] New pre-defined variable eps returns the machine epsilon, that is the difference between 1.0 and the next value representable by a double.

  • [math-core-334] Add support for specifying binary litteral, as 0b1010010.

  • [math-core-334] New function lcm() computes the least common multiple of specified arguments.

  • [math-core-334] Function gcd() now accepts multiple arguments.

Version 3.3.3:

  • [gmic-qt-333] New filter Rendering / ABN Filigrees renders nice 2D closed curves with lot of controls. Filter done by @grosgood .


  • [gmic-qt-333] New filter Rendering / CRT Scanlines simulates the CRT scanline effect.

  • [gmic-qt-333] New filter Rendering / Random Signature.

  • [gmic-qt-333] New filter Degradations / CRT Phosphors.

  • [gmic-qt-333] New filter Deformations / Square to Circle [alt], that warps the image so that every centerted square (or rectangle) becomes a circle (or ellipse), or vice-versa.

  • [gmic-qt-333] New filter Black & White / Filaments, that throws thousands of particles from the image borders and deform their paths according to the image geometry.

  • [gmic-qt-333] New filter Degradations / Noise [Gradient] adds noise to image gradients (rather than image values) then reconstruct the corresponding image by solving the Poisson equation (with FFT).

  • [stdlib-333] New command canny , and the filter Edges (Canny) perform Canny edge detection on selected images.

  • [stdlib-333] New commands clut2hald and hald2clut convert 3D CLUT to 2D HaldCLUT formats.

  • [stdlib-333] Command display gets a new mode to display a 1px outline around each primitives of a 3D mesh. It also now support setting/getting the 3D pose by the user through the variable $_display_3d_pose.

  • [core-333] Command rand is now able to generate random values according to a user-defined probability density function.

  • [math-core-333] New function warp(A,wA,hA,dA,sA,B,wB,hB,dB,sB,_mode,_interpolation,_boundary_conditions) returns the warped version of the image A (viewed as a vector) by the warping field B. This is the math-evaluator analog to the warp command.

  • [math-core-333] New function permute(A,wA,hA,dA,sA,permutation_string) returns the permuted version of the image A (viewed as a vector). This is the math-evaluator analog to the permute command.

  • [math-core-333] New function mirror(A,wA,hA,dA,sA,axes_string) returns the mirrored version of the image A (viewed as a vector). This is the math-evaluator analog to the mirror command.

  • [math-core-333] New function cumulate(A,_wA,_hA,_dA,_sA,_axes_string) returns the cumulated version of the image A (viewed as a vector). This is the math-evaluator analog to the cumulate command.

  • [math-core-333] New function normalize(A,min_value,max_value) returns the normalized version of the vector A . This is the math-evaluator analog to the normalize command.

  • [math-core-333] New function noise(A,amplitude,_noise_type) returns the noisy version of the vector A . This is the math-evaluator analog to the noisy command.

  • [math-core-333] New function index(A,P,nb_channelsP,_dithering,_map_colors) returns the indexed version of the image ‘A’ by the colormap ‘P’. This is the math evaluator analog to command index.

  • [math-core-333] New function histogram(A,nb_levels,_min_value,_max_value) returns the histogram of the vector A. This is the math-evaluator analog to the histogram command.

  • [math-core-333] New function equalize(A,nb_levels,_min_value,_max_value) returns the equalized version of the vector A. This is the math-evaluator analog to the equalize command.

  • [math-core-333] New function hypot() computes the length of the hypothenuse.

  • [math-core-333] New function isconst() returns 1 or 0 whether the given argument is a constant (value known at compilation time) or not.

Version 3.3.2:

  • [gmic-qt-332] New filter Rendering / Warped Rays render a spiral-like shape on the image. It uses the new command shape_rays added to the stdlib.


  • [stdlib-332] New command histogram_masked computes the histogram on masked regions of an image.

  • [stdlib-332] Command dijkstra is now a custom command and has been recoded from scratch. This command computes the minimal path between two vertices of a graph.

  • [math-core-332] New functions da_push_heap() and da_pop_heap() insert/remove elements in/from a dynamic array viewed as a min-heap structure. Useful to manage priority queues from the math evaluator.

Version 3.3.1:

  • [gmic-qt-331] New filter Arrays & Tiles / Loose Photos simulates an effect of loose photos that are spatially arranged to recreate a global picture.

  • [gmic-qt-331] New filter Details / Sharpen [Alpha] implements a new multi-scale image sharpening algorithm that produces very few halos. New associated command sharpen_alpha is also available for script developers.

  • [stdlib-331] Command font returns a font identifier that can be used in text drawing commands, to draw text with more various fonts than the default one.

  • [stdlib-331] Command font2gmz converts a .otf or .ttf font file as a gmz font file that can be used to draw text with custom fonts.

  • [stdlib-331] Commands split_alpha and merge_alpha split an image into several levels of details, that can be recomposed afterwards with alpha-blending.

  • [math-core-331] New function ispercentage(arg) returns 1 or 0 whether arg ends with a % or not.

improvements / Modifications:

Version 3.3.5:

  • [stdlib-335] Command ‘inpaint_pde’: Allow ‘nb_scales’ to be determined as the minimal image size at lowest scale.

Version 3.3.4:

  • [math-core-334] Removed pre-defined variable v in math evaluator (use u(-1,1) instead).

Version 3.3.3:

  • [math-core-333] Function permut() has been renamed as perm().

  • [core-333] G’MIC interpreter now discards possible comments passed in the commands_line argument of G’MIC API functions.

  • [core-333] Community filters are now included by default in the CLI tool gmic as well as in the libgmic library.

  • [stdlib-333] Commands display: When displaying 3D objects, pressing key P not print the 3D pose matrix on stdout.

Version 3.3.2:

  • [gmic-qt-332] When updating filters, the filter tree is refreshed before the dialog window saying the update has been done shows up.

  • [gmic-qt-332] Updated plug-in code to make it work with API changes introduced in GIMP development version v.2.99.12.

  • [gmic-qt-332] Windows installer updated to include missing DLLs from latest GIMP release 2.10.36.

  • [packaging] Put back the CMakeLists.txt file in the project root folder, to allow compiling gmic with cmake.

Version 3.3.1:

  • [core-331] Removed possibility of having stand-alone { ... } blocks in scripts. Now { ... } can be only used for constructs that require a done ending item.

  • [core-331] Command text can now use a custom font defined as an image in the list, in addition to a image-valued variable name.

  • [stdlib-331] Command img2str has been recoded from scratch. It returns the content of the selected images, as special G’MIC input strings.

  • [stdlib-331] Command display: Add forward/backward modes for 3D mesh animation.

  • [stdlib-331] Command text_outline now accepts a custom font as argument.

  • [stdlib-331] Command input_obj: Improve import of .obj mesh with per-vertex defined colors.

  • [stdlib-331] Command xcrop: Single user-defined crop now applies on all selected images.

Bug fixes:

Version 3.3.5:

  • [core-335] Fix: Conditions involving simple expressions inside double quotes and containing a $ were not evaluated correctly.
  • [stdlib-335] Command ‘parse_cli_bashcompletion’: Fix parsing of choice-valued arguments.

Version 3.3.4:

  • [math-core-334] Fix possible side effects in math evaluator, that happened when math compiler was trying to optimize the use of some operator (e.g. x=3; (x^1)=4 was setting 4 to variable x).

Version 3.3.3:

  • [gmic-qt-333] Fix management of dynamic interfaces (for filters that use it) when the “Preview” box is unchecked.

  • [core-333] Fix wrong parsing of xN repetition suffix in input command.

Version 3.3.2:

  • [math-core-332] Fixed functions to remove elements from a dynamic array. When the array became too large, suppressing elements was not possible.

Version 3.3.1:

  • [gmic-qt-331] Fix aspect ratio of preview error when using gui_error_preview.

I would like for display to generate all of the image information on the CLI at once without having to click on images on the display. display is ever only going to be used for knowing what the output would be.

Still hoping for a variable density Hilbert fill option (why not add to the wishlist). lol


Variable Density Hilbert Curve - Software / G’MIC - discuss.pixls.us

Before I put out a issue, I’d like to know why this isn’t working out:


See that &#40? That is supposed to be ( on the G’MIC plugin.

Here, the code:

#@gui:Palette=choice(10,"Black & White-{2}","Red-Green-Blue-{3}","Black with Red-Green-Blue-{4}","Black & White with Red-Green-Blue-{5}","Cyan-Magenta-Yellow-{3}","Cyan-Magenta-Yellow-Black-{4}","White-Cyan-Magenta-Yellow-Black-{5}","Red-Green-Blue with Cyan-Magenta-Yellow-{6}","1-Bit RGB-{8}","Aurora-{256}","Zenit-241","Game Builder Garage: Texture-Sprite Editor Palette-{117}","Duel-{256}","Hocus Pocus Palette-{256}","PLAYPAL-{249}","Sonic Robo Blast 2-{256}","Uzebox-{256}","Andrew Kensler - 16","Andrew Kensler - 32","Andrew Kensler - 54","AAP-Micro 12","AAP-16","AAP-64","AAP-RadiantPLUS-{96}","AAP-SPLENDOR128","AAP-DGA16","Cheerful-32","DB8","DB16","DB32","DB-ISO22","DimWiddy 17","DimWiddy 23","Endesga-4","Endesga-8","Endesga-16","Endesga-32","Endesga-36","Endesga-64","Famicube-{64}","Juicy-32","Juicy-56","XAIUE-22","15P-DX","20P-DX","24P-DX","Cabana-64","Fantasy 16","Fantasy 24","Tranquil Fantasy 23","Tranquility Plus 39","Faraway 48","Fleja Master Palette-{33}","Koni32","Linear Color Palette Basic-{31}","LEGO colors-{43}","Lego Colours 2021-{40}","Vines Flexible Linear Ramps-{38}","Arcade Standard 29","ARQ16","Atom-8","BLK 36","BLK-NEO-{46}","Broken Facility-{40}","Bubblegum-16","CPC BOY-{32}","Cade 15","Calder 8-{11}","CD-BAC-{16}","CG Arne-{16}","DinoKnight 16","||||-22","FZT Ethereal 16","Indecision-{17}","Island Joy 16","Journey-{64}","Shallowmarsh26","Lago Nenufar &#40Lake Water Lily&#41-{19}","Juicy 17","ChocolateGanache-{96}","Bright Winter 1-{74}","Bright Winter 2-{83}","Kawaii16","0xdb-01-{17}","GZXP-{11}","Chromatic16","Piet Coding Language-{20}","Matrix-{96}","Material Design-{96}","Rainbow-{88}","Rainbow-{96}","SCRJ-XXXVI-{36}","Pxls Default-{32}","Lospec500-{42}","Moderna-{24}","Oak21","Nature's Embrace 55","RBYPGO-{94}","New Worlds 46","Nauris-16","Dynamite-{40}","Interstate 28","Downgraded 32","Pear 36","Pineapple 32","Peachy Pop 16","Resurrect 32","Rosy 42","SLSO-CLR17","Softy 15","SPEC12","The Roarin 80's","Starmancer-{52}","SuperFuture25","SUNSHINE 35","Sweetie 16","Calm 48","Optimism-{32}","Taffy 16","Todayland Palette V2-{25}","TriRampo-{12}","r|place 2022-{32}","Tropical Cone 24","Vivid-17","SHIDO50+-{72}","Intacto14","Itatsi-{23}","ENOS16","Grixel Grotto-{16}","Superb 8","Undertones-17","Tango-{28}","Cheese Palette-{28}","Equpix 15","Zughy 32","Voodo34","Franzston 30","Night 16","Star 29","Star 34","Still-Life-{14}","SimpleJPC-16","Acid 15","Battery 24","Clumpy 18","Cthulhu-{16}","Crimso 11-{16}","Copper-Tech-{16}","DRZ15A","Eggy 15","Europa 16","GreyT-bit-{8}","Jewel-{15}","Polar 11","Sheltzy 32","Wyrm 24","Yume Nikki-{24}","Rube-Goldberg-{9}","BoomBoom-{7}","Generic-8","Crayola Blind-{9}","FunkyFuture8","The Golden Wall Palette-{7}","Matriax8c","NT1H-{26}","JerryPie 22","Nineties Nine-{9}","On70-{35}","ANB16","Retrocal-8","Punolit-{21}","Luap 40","Autum Villan 6","Autum 15","Autum 15 [Yellow]","Galaxy Flame-{16}","Cretaceous-16","Antiquity16","Mushroom-{14}","Aerugo-{32}","Hotel Paintings 6","Nopal-12","Brightness GPY-{3}","Blessing-{5}","Fairydust 8","Vanilla MilkShake-{16}","Fuzzy Four-{4}","Fairy Tales-{8}","Naji 16","Easter Island-{16}","Pastel and Darks 58 Palette","17 Pastels","NOSTALGIA15","Ocaso-{17}","Oh Hell&#44 Pastel-{15}","Pollen-8","KULE-16","Hydrangea 11","Fluffy8","ST 8 R&B Remake","Neon Space-{10}","Cyclope6","Sy17","Syz15","TUI-15","Cave-{8}","Psygnosia-{16}","MarshMellow32","Lost Century 24","Finlal 11","Industrial Factory 16","Murder Mystery 16","Fate & Destiny 12","Vinik 24","YKB-22","Halloween-{7}","Graveyard-21","Steam Lords-{16}","Frostical-{18}","DeuteroSpill-{9}","Cool Bone 7","Muted Ally 6","EPHEMERA-{12}","Ink-{5}","Violet Dreams-{8}","Tinyfolks-{5}","Old Gold 7","Rosemoss-8","AAP-RadiantXV-{15}","AAP-Majesty XVII-{17}","Dead Weight-8","Mojave20","Petite-8","Petite-8 Afterdark","XAIUE-Radiant-{22}","Daruda 22","Firestorm-{9}","Borkfest-{8}","Spicy 07","Rust-6","Apricot-{6}","SuperNova 7","Pastry-{5}","Sandy 06","Illumination-{5}","NYX8","Dream Haze 8","OIL6","Regal10","Soft Demon 7","SGM-Palette 2-{17}","Midnight ablaze-{7}","Black Cherry-{5}","Sunset Red-{5}","INKPINK-{6}","Brash Pink-{5}","Pink Neon Sign 6","Enchanted Purple-{12}","Arch-{11}","Spacey Easter-{17}","Fornax Void I-{256}","Fornax Void II-{128}","Pixelwave-{12}","S1-6","Berry Nebula-{8}","ABYSS-9","Moonlight 15","Moonlit-39","H2O-{10}","Magic Waters 9","Bluem0ld-{4}","Moss-{5}","DEEP MAZE-{7}","Toxic Slime-{5}","Lush Green-{6}","Tsunami-{5}","Cryptic Ocean-{6}","Marsh Madness-{5}","OXYD-{8}","Pink&Green-{8}","Walking in the Woods 8","Paper 8","Sahara Pastell-{7}","Sunflower Painting 7","Art Hoe Aesthetic 7","Sky5-{7}","Ocean Glass-{8}","RoyalGuard-{6}","Eulbink-{7}","Winter Wonderland-{8}","Moon Squid 7","Stratus-{5}","Arctic Dust-{5}","CL8UDS","Lilac Skies 5","Sea of Fire-{6}","Autochrome 3","Autochrome 5","GB Default 1-{4}","GB Default 2-{4}","GB Andrade-{4}","GB Blue Seni-{4}","GB Blackzone-{4}","GB Suburb-{4}","GB Crimson-{4}","GB Didi-{4}","GB Dirty-{4}","GB Arne-{4}","GB Easy-{4}","GB Forest-{4}","GB Harsh Green-{4}","GB Light Green-{4}","GB Nostalgia-{4}","GB Platinum-{4}","GB Kirokaze-{4}","GB Cyber-{4}","GB Wish-{4}","GB Grapefruit-{4}","GB Ice Cream-{4}","GB Red_Blue-{4}","Gold GB-{4}","GB Chocolate-{4}","GB Gray-{4}","GB Spacehaze-{4}","GB Purple Dawn-{4}","Moon Crystal-{4}","ARNE4","Autumn Chill-{4}","CherryMelon-{4}","HallowPumpkin-{4}","Hollow-{4}","Lavender4","MAW-{4}","Voltage Warning-{4}","Tritanopia-{5}","Rabbit 7","Amiga 2600 NTSC-{128}","Amiga 2600 PAL-{104}","Amiga 2600 SECAM-{8}","Amiga 7800 M.E.S.S-{256}","Amiga 7800-{256}","Amstrad CPC-{27}","Apple II-{15}","Atari 8-Bit Series - GTIA-{256}","CGA-{16}","CGA Mode 0 [Low]-{4}","CGA Mode 0 [High]-{4}","CGA Mode 1 [Low]-{4}","CGA Mode 1 [High]-{4}","CGA Mode 2 [Low]-{4}","CGA Mode 2 [High]-{4}","Commodore 64 - Pepto-{16}","Commodore 64 - Colodore-{16}","Commodore VIC-20-{16}","Colecovision-{15}","Japanese Machine Palette-{16}","Macintosh II-{16}","Macintosh 8-Bit System Palette-{256}","MSX-{15}","NES-{55}","PICO-8-{16}","RISC OS-{16}","SAM Coupe-{128}","Thomson MO5-{16}","TRS-80 Color Computer Palette-{4}","Virtual Boy interpreted-{4}","VGA-{244}","Win 95-{256}","ZX Spectrum-{15}","GNOME 32","Electronic Crayon 22","Chip16","Deluxe Paint-{222}","FlatUI-{20}","MakeCode Arcade Palette-{15}","Oekaki-{20}","Legacy Paint-{16}","XP Paint-{28}","Vista Paint-{28}","Piet Palette-{5}","Japanese Woodblock Palette-{12}","Human Faces-{94}","HSV Palette-{96}","ST24 Christmas","Reds-{24}")

( is correct, not &#40. (see HTML Symbols | HTML Emojis).

1 Like

This is not practical to do this if you have a lot of images (e.g. 100+) to display at the same time.
This overflows the terminal with information that is probably too detailed for the average person.

Workaround: You can define the following command:

my_display : 
  v 1 print 
  v 0 display

Can I set this to default display?

Rather use:

$ gmic update

Then set global variable _display_print_images to inf, in your cli_start command:

cli_start : 
1 Like

It works though I have to wait for it finish printing before displaying images.

A simple case test:

$ +pal *

The above generates all of the palettes available within +pal which is 385 palettes.

That’s precisely why it’s actually not a good idea to print all images, and why I’ve limited it to the first 5 images by default.

  • 2023/10/05: Release of G’MIC 3.3.1.

Any way possible to add an avoidance mask for Packed Ellipses, David? Would be cool to use such a mask with some of my circlism renders. Anyway, just trying to be the noisy wheel (to get the grease). lol



I’m on 3.3.1pre#23093022 and just updated the filters.
Does it replace ispercentage ?
A few filters are now broken and output this kind of error :

Invalid right-hand side; Unrecognized function call 'ispercentage(0)' in expression 'round(ispercentage(0)?w*0:0'.

Some filters affected:


maybe more?

No, that the opposite: ispercentage() replaces ispercent().

Ah, so maybe i have to rebuild a more recent version?

Yes, definitely.
Version 3.3.1 has been released (currently the latest stable), and is no longer in “pre-release” mode.

My bad then :frowning:
It works now :slight_smile:

@David_Tschumperle I have a question, is there any plan for 16-bit support on the GUI color selector?

Probably not unless the Qt-widget for selecting color goes to 16bits.

1 Like