I mean, even if there were greater reliance on ImageMagick, it’s not as if that’s in any way a problem, remotely unusual, or anything other than the entire point of the open-source community in the first place! Heck, there’s nothing worse than someone needlessly reinventing the wheel with their own implementation of solved problems.
And it’s not like ImageMagick doesn’t equally “stand on the shoulders of giants” as well. Their code includes a robust system of Delegates they defer to for handling certain operations. The delegate users are most likely to have encountered is Inkscape, which IM uses for all PDF rendering, but that’s not remotely the sole case. The iist of external Delegates can be obtained by passing -list Delegate to any IM command, and for IM 6.9.11-27 on my Fedora 32 system, the lengthy output that results is, in full:
If $var>6, then the height is resized, otherwise it chooses the interpolation.
Sometimes I want to retrieve a stat from a channel. I try i0M or iM0 for instance but it isn’t supported. Is there a way to do it, or is this a feature request?
Indeed, that’s not good. Never noticed that.
I think I’ll have to remove the syntax resize [img],interpolation.
It’s less used than the other one, and it can be easily replaced by resize [img],[img],[img],[img],interpolation. It’s a bit longer, but at least, it removes the ambiguity, and this can be replaced by a new custom command if necessary.
Two options there:
If you are designing a pipeline, out of the math evaluator: sh. 0 iM0={iM} rm.
If you want to do it inside the math evaluator: iM0 = max(crop(#0,0,0,0,0,w#0,h#0,d#0,1))
I’ve started working on next version 2.9.3 of G’MIC.
In command resize, I’ve removed the support of the argument list [image],_interpolation,_boundary_conditions,_ax,_ay,_az,_ac, to get rid of the possible ambiguity with the other possible arguments of resize.
In the stdlib, I’ve added a command resize_as_image (eq. to ri) that can be used as a replacement of the previous syntax (just add an i to the r with the old syntax, and it’s OK).
I’ve started replacing all the previous uses of this old syntax of resize in the .gmic files. I may have missed some. We’ll have to check if all filters work.
I’m trying to post binary packages for 2.9.3_pre during the day.