GREYC CNRS ENSICAEN UNICAEN
A Full-Featured Open-Source Framework for Image Processing

Latest stable version: 2.3.3
Image gallery
This gallery gives a quick overview of the kind of features and generic filters available in the G'MIC open-source image processing framework.
All the images below have been processed by the CLI interface gmic of G'MIC, from a set of initial 2D color images. Click on an image to enlarge it and display the G'MIC command-line used for the processing (note: to reproduce this, you may have to escape some characters, according to type of shell you use!).
Remember, G'MIC lets you define your own image pipelines through custom command files. Your custom filters can be easily added afterwards in the plug-in for GIMP or Krita.
For more details, visit the tutorial pages as well as the technical reference to get a full documentation on this software.


gallery_gallery_codesamples1
3D torus
# File : torus3d.gmic
# Author : David Tschumperle

go :

  # Create 3d textured double-torus object.
  srand 16
  repeat 2
    torus3d 70,20 100,100,1,3
    plasma[-1] 1,1,3 normalize[-1] 0,255 equalize[-1] 256  # Generate plasma texture
    +fill_color[-1] ${-RGB} image[-2] [-1],0,0,0,0,0.6     # Tint it a little bit with a random color
    texturize3d[-3] [-2]
    remove[-2,-1]
  done
  rotate3d[-1] 1,0,0,90 +3d[-1] 80,0,0  # Shift and merge torii
  +3d center3d rotate3d 1,0,0,30 *3d 2

  # Create background image.
  600,600,1,3 plasma[-1] 1,1 normalize[-1] 0,255 *[-1] '[0.2,0.3,0.7]'

  # Generate animation frames.
  repeat 45
    +water[1] 100
    object3d[-1] [0],50%,50%,0,1,5,0
    rotate3d[0] 1,2,3,8
  done

  remove[0,1]  # Remove 3d object + background
  r2dx 50%     # Anti-alias frames

# End of file.


[ Source code ]
gallery_gallery_codesamples1
Command: $ gmic https://gmic.eu/samples/torus3d.gmic go
(generated in 1.87s)
gallery_gallery_codesamples2
Pacman
# File : pacman.gmic
# Author : David Tschumperle

go :

  # Create background image = [0].
  500,300,1,3
  line 0,8%,100%,8%,1,1
  line 0,92%,100%,92%,1,1
  blur y,5%,1 * '[64,32,255]' normalize 0,255

  # Create image of pellets = [1].
  shape_circle 30
  resize[-1] 300%,100%,1,1,0,0,0.5 W={w}
  resize[-1] [-2],100%,1,1,0,2

  # Create colormap = [2].
  (0,0,0;255,255,255;255,255,0) permute. yzcx

  nbf=20
  repeat $nbf,f
    [0],[0] circle[-1] 30%,50%,15%,1,2
    y={h/2-2*h*($f<$nbf/2?$f:$nbf-$f)/$nbf}
    polygon[-1] 3,30%,50%,100%,$y,100%,{h-$y}
    +fill[-1] 0 image[-1] [1],{w/10+2*$W*(1-$f/$nbf)},{(h-h#1)/2}
    max[-2,-1] map[-1] [2] max[-1] [0]
  done
  remove[0-2]

# End of file.


[ Source code ]
gallery_gallery_codesamples2
Command: $ gmic https://gmic.eu/samples/pacman.gmic go
(generated in 0.05s)
gallery_gallery_codesamples3
Scrolling
# File : scrolling.gmic
# Author : David Tschumperle

go :
  srand 32

  # Define rendering sizes.
  wf,hf=512,384
  wr,hr={round(1.5*[$wf,$hf])}

  # Generate image [0] = line of text.
  input 0 text "G'MIC rocks !   ",0,0,48,1,1 wt,ht={[w,h]} resize {2.5*$wr},100%,1,1,0,2

  # Generate image [1] = color gradient.
  input {10*ceil($hr/$ht)},1,1,3,u(64,255) tsp[-1] , transpose[-1] resize[-1] $wr,$hr,1,3,3

  # Generate image [2] = 3d cube (3d object).
  box3d {$wr/3} color3d[-1] 255,32,200 center3d[-1]

  # Generate animation frames.
  nbf=50
  repeat $nbf,f
    input $wr,$hr,1,1
    repeat {ceil($hr/$ht)}
      image[-1] [0],{w/5*cos($>/3+2*pi*$f/$nbf)-$wt*(1+$f/$nbf)},{$>*$ht}
    done
    +mul[1,-1] remove[-2]
    rotate[-1] 25,1,0
    resize[-1] $wf,$hf,1,100%,0,0,0.5,0.5
    +fill[-1] 0
    +rotate3d[2] 1,-1,0,{180*$f/$nbf} rotate3d[-1] 0,1,0,{360*$f/$nbf} rotate3d[-1] 1,2,3,-60
    object3d[-2] [-1],50%,50%,100,1,3,0,0
    remove[-1] div[-1] 1.6 max[-2,-1]
  done
  keep[3--1]

# End of file.


[ Source code ]
gallery_gallery_codesamples3
Command: $ gmic https://gmic.eu/samples/scrolling.gmic go
(generated in 0.92s)
gallery_gallery_codesamples4
Landscape
# File : landscape.gmic
# Author : David Tschumperle

go :
  srand 512

  # Generate elevation map [0] and texture [1]
  input 512,480 plasma[-1] 1,1,5 resize[-1] 100%,400%,1,1,0,2 blur[-1] 3 cut[-1] 40%,inf normalize[-1] 0,255
  input (0,102,51;149,175,124;102,42,0;255,255,255) permute[-1] yzcx srgb2rgb[-1] resize[-1] 256,1,1,3,3 rgb2srgb[-1]
  point[-1] 0,0,0,1,64,100,200 +map[-2] [-1] rm[-2] normalize[0] 0,40

  # Generate background image [2].
  input 1,4,1,3,"y==0?[50,0,100]:y==1?[219,140,15]:y==2?[140,18,15]:[100,0,0]" resize[-1] 400,300,1,3,3

  # Generate frames
  nbf=50
  repeat $nbf,f
    y={h#0/4*(1+$f/$nbf)}
    ang={6*sin(2*pi*$f/$nbf)}
    +rows[0,1] $y,{$y+h#0/3-1} w,h={[w,h]}
    rotate[-2,-1] $ang,1,0,50%,50%

    +fill[-2] 'y/h' cut[-1] 5%,50% normalize[-1] 0,1
    input 100%,100%,1,3,'[219,140,15]/3' image[-3] [-1],0,0,0,0,1,[-2] remove[-2,-1]

    elevation3d[-1] [-2] remove[-2] reverse3d[-1]
    -3d[-1] {$w/2},0,0 r3d[-1] 1,0,0,90 +3d[-1] 0,50,0 *3d[-1] {-2,4*w/$w}
    +object3d[2] [-1],50%,35%,-250,1,5,0,1,300,0,-1000,-2200,0.3,0.5 remove[-2]
  done
  remove[0-2]

  # Quantize all frames in 256 colors with the same colormap, to avoid .gif flickering.
  +colormap[50%] 256 index[^-1] [-1],0,1 remove[-1]

# End of file.


[ Source code ]
gallery_gallery_codesamples4
Command: $ gmic https://gmic.eu/samples/landscape.gmic go
(generated in 30.13s)

Arrays & framesArtisticB&WColorsDeformationsFilteringPatterns3D renderingCode samples
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.