G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.5.5        Current pre-release: 3.6.0 (2025/08/04)

Reference
Table of Contents  ▸  List of Commands◀  Adding Custom Commands    |    Funny Oneliners  ▶

List of Commands

All available G'MIC commands are listed below, by categories. An argument specified between [] or starting by _ is optional except when standing for an existing image [image], where image can be either an index number or an image name. In this case, the [] characters are mandatory when writing the item. Note that all images that serve as illustrations in this reference documentation are normalized in range [0,255] before being displayed. You may need to do this explicitly (command normalize 0,255) if you want to save and view images with the same aspect than those illustrated in the example codes.
The examples accompanying this List of Commands illustrate the use of the G'MIC language and are written as they would appear in a custom command. While some examples may work if entered directly at a shell prompt, there is no guarantee. No attempt has been made to escape special characters in these examples, which many shells reserve.

Categories:

Global Options:

debug help version

Input / Output:

camera command compress_to_keypoints cursor delete display display0
display_array display_camera display_clut display_fft display_graph display_histogram display_parametric
display_polar display_quiver display_rgba display_tensors display_voxels3d display_warp echo
echo_file font font2gmz function1d identity input input_565
input_bytes input_csv input_cube input_flo input_glob input_gpl input_cached
input_normalized input_obj input_text lorem network output output_565
output_cube output_flo output_ggr output_gmz output_obj output_text outputn
outputp outputw outputx parse_cli parse_gmd gmd2html gmd2ascii
parse_gui pass plot poincare_disk portrait print random_pattern
screen select serialize shape_circle shape_cupid shape_diamond shape_dragon
shape_fern shape_gear shape_heart shape_menger shape_mosely shape_polygon shape_rays
shape_snowflake shape_star shared sample srand store testimage2d
uncommand uniform_distribution unserialize update verbose wait warn
window

List Manipulation:

keep keep_named move name remove remove_duplicates remove_empty
remove_named reverse sort_list

Mathematical Operators:

abs abscut acos acosh add and argmax
argmaxabs argmin argminabs asin asinh atan atan2
atanh bsl bsr cos cosh cut deg2rad
div eq erf exp ge gt inrange
isinf isnan le lt log log10 log2
max maxabs mdiv med min minabs mod
mmul mul neq oneminus or pow rad2deg
rol ror sign sin sinc sinh softmax
softmin sqr sqrt sub tan tanh xor

Values Manipulation:

apply_curve apply_gamma balance_gamma cast complex2polar compress_clut compress_huffman
compress_rle cumulate decompress_clut decompress_from_keypoints decompress_huffman decompress_rle discard
eigen2tensor endian equalize fill index map mix_channels
negate noise noise_hurl noise_perlin noise_poissondisk normp norm1
norm2 normalize normalize_l2 normalize_sum orientation otsu polar2complex
quantize quantize_area rand rand_sum replace replace_inf replace_infnan
replace_nan replace_seq replace_str round roundify set threshold
vector2tensor

Colors:

adjust_colors apply_channels autoindex bayer2rgb clut clut2hald hald2clut
cmy2rgb cmyk2rgb colorblind colormap compose_channels count_colors deltaE
direction2rgb ditheredbw fill_color gradient2rgb hcy2rgb hsi2rgb hsi82rgb
hsl2rgb hsl82rgb hsv2rgb hsv82rgb int2rgb ipremula jzazbz2rgb
jzazbz2xyz lab2lch lab2rgb lab2srgb lab82srgb lab2xyz lab82rgb
lch2lab lch2rgb lch82rgb luminance lightness lut_contrast map_clut
match_histogram match_icp match_pca match_rgb mix_rgb oklab2rgb palette
premula pseudogray random_clut random_clut replace_color retinex rgb2bayer
rgb2cmy rgb2cmyk rgb2hcy rgb2hsi rgb2hsi8 rgb2hsl rgb2hsl8
rgb2hsv rgb2hsv8 rgb2int rgb2jzazbz rgb2lab rgb2lab8 rgb2lch
rgb2lch8 rgb2luv rgb2oklab rgb2ryb rgb2srgb rgb2xyz rgb2xyz8
rgb2yiq rgb2yiq8 rgb2ycbcr rgb2yuv rgb2yuv8 remove_opacity ryb2rgb
select_color sepia solarize split_colors split_opacity split_vector srgb2lab
srgb2lab8 srgb2rgb to_a to_color to_colormode to_gray to_graya
to_pseudogray to_rgb to_rgba to_automode xyz2jzazbz xyz2lab xyz2rgb
xyz82rgb ycbcr2rgb yiq2rgb yiq82rgb yuv2rgb yuv82rgb

Geometry Manipulation:

append append_tiles apply_scales autocrop autocrop_components autocrop_coords autocrop_seq
channels columns crop elevate expand extract extract_region
montage mirror permute rescale2d rescale3d resize resize_as_image
resize_displacement resize_mn resize_pow2 rotate rotate_tileable rows scale2x
scale2x_cnn scale3x scale_dcci2x seamcarve shift shrink slices
sort split split_tiles undistort unroll upscale_smart volumetric2d

Filtering:

bandpass bilateral blur blur_angular blur_bloom blur_linear blur_radial
blur_selective boxfilter bump2normal closing closing_circ convolve convolve_fft
correlate cross_correlation curvature dct deblur deblur_goldmeinel deblur_richardsonlucy
deconvolve_fft deinterlace denoise denoise_haar denoise_cnn denoise_patchpca deriche
dilate dilate_circ dilate_oct dilate_threshold divergence dog diffusiontensors
erode erode_circ erode_oct erode_threshold fft gradient gradient_norm
gradient_orientation guided haar heat_flow hessian idct iee
ifft ihaar ilaplacian inn inpaint inpaint_pde inpaint_flow
inpaint_holes inpaint_morpho inpaint_matchpatch kuwahara laplacian lic map_tones
map_tones_fast meancurvature_flow median merge_alpha nlmeans nlmeans_core normalize_local
normalized_cross_correlation opening opening_circ percentile peronamalik_flow phase_correlation pde_flow
periodize_poisson rbf red_eye remove_hotpixels remove_pixels rolling_guidance sharpen
sharpen_alpha smooth split_freq solve_poisson split_alpha split_details structuretensors
solidify syntexturize syntexturize_matchpatch tv_flow unsharp unsharp_octave vanvliet
voronoi watermark_fourier watershed

Features Extraction:

area area_fg at_curve at_quadrangle barycenter betti canny
delaunay detect_skin displacement distance edgels edges fftpolar
histogram histogram_masked histogram_nd histogram_cumul histogram_pointwise hough huffman_tree
ifftpolar img2patches isophotes label label_fg laar max_patch
min_patch minimal_path mse mse_matrix patches2img patches matchpatch
matchpatch_alt plot2value pointcloud psnr psnr_matrix segment_watershed shape2bump
skeleton slic ssd_patch ssim ssim_matrix thinning tones
topographic_map tsp variance_patch

Image Drawing:

arrow axes ball chessboard cie1931 circle close_binary
curve ellipse flood gaussian graph grid image
imagealpha line line_aa spline thickcircle thickellipse thickline
thickpolygon thickspline mandelbrot marble maze maze_mask newton_fractal
object3d pack_sprites piechart plasma point polka_dots polygon
quiver rectangle rorschach sierpinski spiralbw tetraedron_shade text
text_outline triangle_shade truchet turbulence yinyang

Matrix Computation:

diagonal dijkstra eigen eye fitsamples invert meigen
mproj orthogonalize poweriteration solve svd transpose trisolve

3D Meshes:

add3d animate3d apply_camera3d apply_matrix3d array3d arrow3d axes3d
boundingbox3d box3d center3d chainring3d circle3d circles3d color3d
colorcube3d colorize3d cone3d cubes3d cup3d curve3d cylinder3d
delaunay3d distribution3d div3d double3d elevation3d empty3d extract_textures3d
extrude3d focale3d fov3d gaussians3d gmic3d gyroid3d histogram3d
image6cube3d imageblocks3d imagecube3d imageplane3d imagepyramid3d imagerubik3d imagesphere3d
isoline3d isosurface3d label3d label_points3d lathe3d light3d line3d
lines3d lissajous3d mode3d moded3d mul3d multithreaded3d normalize3d
normals3d opacity3d parametric3d pca_patch3d plane3d point3d pointcloud3d
pose3d primitives3d projections3d pyramid3d quadrangle3d random3d reverse3d
rotate3d rotation3d sierpinski3d size3d skeleton3d snapshot3d specl3d
specs3d sphere3d spherical3d spline3d split3d sprite3d sprites3d
star3d streamline3d sub3d subdivide3d superformula3d surfels3d tensors3d
text_pointcloud3d text3d texturize3d torus3d triangle3d volume3d voxelize3d
weird3d

Flow Control:

apply_parallel apply_parallel_channels apply_parallel_overlap apply_tiles apply_timeout check check3d
continue break do done elif else fi
error eval exec exec_out for foreach if
local noarg onfail parallel progress quit repeat
return rprogress run skip status while

Neural Networks:

nn_lib nn_add nn_append nn_avgpool2d nn_avgpool3d nn_check_layer nn_clone
nn_conv2d nn_conv2dnl nn_conv2dnnl nn_conv3d nn_conv3dnl nn_conv3dnnl nn_crop
nn_distance nn_div nn_dropout nn_fc nn_fcnl nn_fcnnl nn_init
nn_input nn_load nn_loss_add nn_loss_binary_crossentropy nn_loss_crossentropy nn_loss_mse nn_loss_normp
nn_loss_softmax_crossentropy nn_maxpool2d nn_maxpool3d nn_mul nn_nl nn_normalize nn_patchdown2d
nn_patchdown3d nn_patchup2d nn_patchup3d nn_print nn_rename nn_resconv2dnl nn_resconv3dnl
nn_resfcnl nn_reshape nn_resize nn_run nn_save nn_select nn_size
nn_split nn_store nn_sub nn_tconv2d nn_tconv2dnl nn_trainer

Arrays, Tiles and Frames:

array array_fade array_mirror array_random frame frame_blur frame_cube
frame_fuzzy frame_painting frame_pattern frame_round frame_seamless img2ascii imagegrid
imagegrid_hexagonal imagegrid_triangular map_sprites pack puzzle rotate_tiles shift_tiles
taquin tunnel

Artistic:

boxfitting brushify cartoon color_ellipses cubism draw_whirl drop_shadow
drop_shadow ellipsionism fire_edges fractalize glow halftone hardsketchbw
hearts houghsketchbw lightrays light_relief linify mosaic old_photo
pencilbw pixelsort polaroid polygonize poster_edges poster_hope rodilius
sketchbw sponge stained_glass stars stencil stencilbw stylize
tetris warhol weave whirls

Warpings:

deform euclidean2polar equirectangular2nadirzenith fisheye flower kaleidoscope map_sphere
nadirzenith2equirectangular polar2euclidean raindrops ripple rotoidoscope spherize symmetrize
transform_polar twirl warp warp_patch warp_perspective warp_rbf warp_seamless
water wave wind zoom

Degradations:

cracks light_patch pixelize scanlines shade_stripes shadow_patch shuffle
spread stripes_y texturize_canvas texturize_paper vignette watermark_visible

Blending and Fading:

blend nblend blend_edges blend_fade blend_median blend_seamless fade_diamond
fade_linear fade_radial fade_x fade_y fade_z sub_alpha

Image Sequences and Videos:

animate apply_camera apply_files apply_video average_files average_video fade_files
fade_video files2video median_files median_video morph morph_files morph_rbf
morph_video register_nonrigid register_rigid transition transition3d video2files

Convenience Functions:

add_copymark alert arg arg0 arg2img arg2var average_vectors
base642img base642uint8 basename bin bin2dec cat color2name
covariance_vectors da_freeze date dec dec2str dec2bin dec2hex
dec2oct fibonacci file_mv filename filename_rand filename_dated files
files2img fitratio_wh fitscreen fontchart fps hex hex2dec
hex2img hex2str img2base64 img2hex img2str img2text is_mesh3d
is_change is_half is_ext is_image_arg is_pattern is_videofilename is_macos
is_windows lof math_lib mad max_w max_h max_d
max_s max_wh max_whd max_whds median_vectors min_w min_h
min_d min_s min_wh min_whd min_whds name2color named
narg normalize_filename oct oct2dec padint path_cache path_cached_file
path_current path_gimp path_tmp remove_copymark reset rgb rgba
shell_cols size_value std_noise str strbuffer str2hex strcapitalize
strcontains strclut strlen strreplace strlowercase struppercase strvar
strcasevar strver tic time toc uint82base64

Other Interactive Commands:

demos x_2048 x_blobs x_bouncing x_color_curves x_colorize x_connect4
x_crop x_cut x_fire x_fireworks x_fisheye x_fourier x_grab_color
x_hanoi x_histogram x_hough x_jawbreaker x_landscape x_life x_light
x_mandelbrot x_mask_color x_metaballs3d x_minesweeper x_minimal_path x_morph x_pacman
x_paint x_plasma x_quantize_rgb x_reflection3d x_rubber3d x_segment x_select_color
x_select_function1d x_select_palette x_shadebobs x_spline x_starfield3d x_tetris x_threshold
x_tictactoe x_tixy x_warp x_waves x_whirl

Command Shortcuts:

Shortcut nameEquivalent command name
hhelp
mcommand
ddisplay
d0display0
dadisplay_array
dcdisplay_camera
dclutdisplay_clut
dfftdisplay_fft
dgdisplay_graph
dhdisplay_histogram
dqdisplay_quiver
drgbadisplay_rgba
dtdisplay_tensors
dv3ddisplay_voxels3d
dwdisplay_warp
eecho
iinput
ibinput_bytes
iginput_glob
ininput_normalized
itinput_text
ooutput
otoutput_text
onoutputn
opoutputp
owoutputw
oxoutputx
pprint
shshared
spsample
umuncommand
upupdate
vverbose
wwindow
kkeep
knkeep_named
mvmove
nmname
=>name
rmremove
rmnremove_named
rvreverse
+add
&and
<<bsl
>>bsr
ccut
/div
==eq
>=ge
>gt
<=le
<lt
m/mdiv
%mod
m*mmul
*mul
!=neq
|or
^pow
-sub
ffill
irinrange
normnorm2
nnormalize
=set
acapply_channels
fcfill_color
aappend
zcrop
rsrescale2d
rs3drescale3d
rresize
riresize_as_image
ssplit
yunroll
bblur
ggradient
jimage
jaimagealpha
j3dobject3d
ttext
totext_outline
+3dadd3d
c3dcenter3d
col3dcolor3d
/3ddiv3d
db3ddouble3d
f3dfocale3d
l3dlight3d
m3dmode3d
md3dmoded3d
*3dmul3d
mt3dmultithreaded3d
n3dnormalize3d
o3dopacity3d
p3dprimitives3d
rv3dreverse3d
r3drotate3d
sl3dspecl3d
ss3dspecs3d
s3dsplit3d
-3dsub3d
t3dtexturize3d
apapply_parallel
apcapply_parallel_channels
apoapply_parallel_overlap
atapply_tiles
xexec
xoexec_out
llocal
qquit
ustatus
nmdnamed
xzx_crop
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.