Sphere filter in Gimp but not in CLI??

I am looking at the g’mic deformation filter “Sphere” in Gimp 2.10 and I am trying to locate this filter in the CLI version to get the right syntax but after typing -h and searching in “warpings” there is no such entry only “spherize” which is something similar but not the same. What am I missing? Thanks!

Some filters do not have a reference line. However, if you see them in GIMP, you may use them in the CLI. Do the following to discover the proper command.

Or, go to the following and examine the code:
https://raw.githubusercontent.com/dtschump/gmic/master/src/gmic_stdlib.gmic
https://github.com/dtschump/gmic-community/tree/master/include

again
#@cli spherize : _radius[]>=0,_strength,_smoothness[]>=0,_center_x[],_center_y[],_ratio_x/y>0,_angle,_interpolation
but no sphere

I also can not map the “input/output” image with the gmic 2.3.3 gui I am looking at.2018-08-11%2018_38_59-Start

I found
Preferences > Other > Ausgabe der Meldungen > Sehr ausführlich (Konsole)
but what Konsole?

I tried

gmic sample tiger -sphere 2000,2000,100,0.5,0,50,20,0,0,0,0 -output sphere.jpg
(or sphere or -fx_shere)

and got

[gmic]-1./ *** Error *** Unknown command or filename ‘-sphere’ (did you mean ‘-sphere3d’ ?).

so the command did not exist??

Now I got this in a Linux-Gimp environment but nothing happens on a terminal

You should output to new layer name. The command is fx_map_sphere

image

Thank you very much for your replay.

Something like
gmic -input path -map_sphere 3000,3000,100,0.5 -output path
is working with gmic-cli-2.3.3-win64.
With fx_map_sphere I get
[gmic] Command ‘fx_map_sphere’ has no description (did you mean ‘map_sphere’ ?).

But with my version gmic-gimp 2.0.2 on a Linux-VM I can not replicate the thing with the console. Your screenshot looks nothing like gimp at all so perhaps you are using another image processing host.

Sad that those filters are not properly documented because I also need the syntax of “kaleidoscope[symmetry]” and that is nothing like the documented “kaleidoscope”.

I am using versions different from you. Try doing

gmic update

in CLI. As for the G’MIC GUI plugin, there are two things you need to update: a) the plugin itself and b) the filters.

Bottom left corner is the “update filters” button.

image


I copy-pasted the filter’s code. As you can see, fx_map_sphere actually uses map_sphere. If you are deriving values from the GUI, you should be able to use fx_map_sphere and should be using it rather than the latter.

#@gui Sphere : fx_map_sphere, fx_map_sphere_preview(1)
#@gui : Width = _int(512,1,4096)
#@gui : Height = _int(512,1,4096)
#@gui : Radius = float(90,0,400)
#@gui : Dilation = float(0.5,0,1)
#@gui : Angle = float(0,-50,50)
#@gui : Border smoothness = float(0,0,200)
#@gui : Border width = float(20,0,100)
#@gui : Orientation = choice("0 deg.","90 deg.","180 deg.","270 deg.")
#@gui : Background = choice("Transparent","Mean color")
#@gui : Fading = float(0,0,100)
#@gui : Fading shape = float(0.5,0,3)
#@gui : sep = separator(), note = note("<small>Author: <i>David Tschumperl&#233;</i>.      Latest update: <i>2011/07/11</i>.</small>")
fx_map_sphere :
  rotate {$8*90}
  if $6
    repeat $!
      shift. {round(w/2)},0,0,0,2 +columns. {(1-$7/100)*w/2},{(1+$7/100)*w/2}
      100% gaussian. {0.1*w},{h},0 100% 100% a[-3--1] c r. ..,..,1,3
      smooth.. .,$6,5,0 rm.
      j.. .,{(1-$7/100)*{-2,w}/2} rm. shift. -{round(w/2)},0,0,0,2
    mv. 0 done
  fi
  shift $5%,0,0,0,2 to_rgba
  if $9
    repeat $!
      +rows[$>] 0 r. 1,1,1,4,2 RGBA$>={^}
      r. [$>],[$>],1,4 -[$>,-1]
    done
  fi
  map_sphere $1,$2,$3,$4,$10,$11
  if $9
    repeat $!
      (${RGBA$>}) y. c r. [$>],[$>],1,4 +[$>,-1]
    done
  fi

fx_map_sphere_preview :
  fx_map_sphere {w},{h},${3--1}

update worked within gmic-cli-2.3.3-win64 (no errors) but no info if something was really done because gmic version delivers again 2.3.3.

as of the source code: I looked in gmic_stdlib.gmic and saw that Kaleidoscope [symmetry]
#@gui Kaleidoscope [symmetry] : fx_symmetrizoscope, fx_symmetrizoscope(1)
is a function of symmetrize (repeat iteration … done) but unclear if the command fx_symmetrizoscope will be accepted by gmic-cli-2.3.3-win64 so I tried
gmic -input path -fx_symmetrizoscope 6,0,3,1 -output path
and it worked!!

Again thank you very much for your time and help!

regards Guenter

Finally I tried the fx_map_sphere variant with
gmic -input path -fx_map_sphere 3000,3000,100,0.5,0,0,20,0,0,0,0 -output path
and I got not a RGB image but a RGBA 3000x3000x1x4.I added a -to_colormode 3 and the result is fine.