ok, there was an error, I wrote elif instead of else and closed with fi ! The l[] was interpreted by the math processor!
cli_start : _vt100=1 if $_version<303
if $_version<297 m "delete : file_rm $""*" fi
# if $_version>=299 l[] m 1,/Users/karo/sw/gmic_bm/BAM_299.gmic onfail endl fi
l [] if $_version>=301 l[] m 1,/Users/karo/sw/gmic_bm/bh.gmic onfail endl fi
# l[] m 1,/Users/karo/sw/gmic/src/gmic_stdlib.gmic onfail endl
# l[] m 1,/Users/karo/sw/gmic-community/include/karsten_rodenacker.gmic onfail endl
# l[] m 1,/Users/karo/sw/gmic_bm/ak_surface.gmic onfail endl
# l[] m 1,/Users/karo/_gmic/blather.gmic onfail endl
# l[] m 1,/Users/karo/sw/gmic_bm/in.gmic onfail endl
elif
# l[] m 1,/Users/karo/sw/gmic_bm/BAM_310.gmic onfail done
l[] m 1,/Users/karo/sw/gmic_bm/bh.gmic onfail done
# l[] m 1,/Users/karo/sw/gmic/src/gmic_stdlib.gmic onfail done
# l[] m 1,/Users/karo/sw/gmic-community/include/karsten_rodenacker.gmic onfail done
# l[] m 1,/Users/karo/sw/gmic_bm/ak_surface.gmic onfail done
# l[] m 1,/Users/karo/_gmic/blather.gmic onfail done
# l[] m 1,/Users/karo/sw/gmic_bm/in.gmic onfail done
fi
So, variadic macros in math parser now work. And the foreach construct is so useful that it is used everywhere now in the stdlib (with or without braces).
By chance, do you have any other ideas like this for improving the language ?
I’ve fixed a small (but annoying) bug today, related to the new command foreach, that was introducing some crashes in the plug-in, for some filters.
It should be better now. I’ve updated all the pre-release binaires on the G’MIC website.
I guess only a few minor issues should remain. That’s good news!
I’ve converted the stdlib to the use of foreach and { ... } blocks.
I’ll probably stop the development right now, as I’ve important things to do for my research. Do not hesitate to test and report any issue.
Thanks.
Opening and closing are classical morphological operations :
They are basically :
Closing = Dilation then Erosion
Openion = Erosion then Dilation
Anyway, it is necessary to pay attention to the boundary conditions when implementing those (so it’s not as simple as closing : dilate $1 erode $1 ). This is why I’ve added these operators as new commands.
Questions to those who could test G’MIC 3.1… Did you have any problems with the latest development versions? If not, I might consider doing a release soon.
Hi,
I have not tested development versions but since 2.9.9 I cannot load jpg in the standalone windows application: gmic_x.x.x.x_qt_win64.zip
I ever load a jpg generated with Rawtherapee.
Version 2.9.9:
Using the Gimp plugin and Windows CLI 3.1.0 (pre-#220305):
When running command 'fx_houghsketchbw 1.25,10,5,80,0.1,4,0,50,50', this error occurred:
[gmic_gimp_qt]./error/ *** Error in ./fx_houghsketchbw/*if/ *** Command 'done': Not associated to a 'for', 'foreach' or 'repeat' command within the same scope.
Also for the non-offcial filters .Map Projection’ ( G'mic projection scripts - 2021-01-13 - Pastebin.com )
with default parameters we get e.g:
*** Error in ./lambert_conformal_conic_projection/*if/ *** A ‘fi’ command is missing, before return point.
Any other values show:
*** Error in ./conic_equidistant_projection/*if/ *** Unknown command or filename ‘endif’; did you mean ‘elif’?
Those Map Projection are on the list of my TODO to address. Not the highest priority, but eventually I can address them. They will eventually be part of gmic-community, and I have exchanged communication with the author of said filters, he is fine with making them public. I will be doing optimization and fixes.
Version 3.1.0 (pre-release #220316) still the same, though the Hough Sketch is only problematic on the default Color Model option (Color on White)
Thanks!