PTdecode/CImg-1.3.0/examples/gmic4gimp_def.raw

Wed, 05 Aug 2009 15:02:31 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Wed, 05 Aug 2009 15:02:31 +0100
changeset 13
a933b13e087f
parent 5
1204ebf9340d
permissions
-rwxr-xr-x

PTdecode: add support for uncompressed data (NOTE: *NOT* supported by the PT-2450DX)

philpem@5 1 #@gimp
philpem@5 2 #
philpem@5 3 # File : gmic4gimp_def.raw
philpem@5 4 # ( G'MIC for GIMP default macros and menu entries)
philpem@5 5 #
philpem@5 6 # Description : Define menu entries for the GIMP plug-in.
philpem@5 7 # ( http://gmic.sourceforge.net )
philpem@5 8 # This file is also a part of the CImg Library project.
philpem@5 9 # ( http://cimg.sourceforge.net )
philpem@5 10 #
philpem@5 11 # Note : This file is here for illustration purposes, since commands defined in
philpem@5 12 # the default macro file are already present by default in G'MIC.
philpem@5 13 # Then, explicit inclusion of this file (using the '-m' option) if
philpem@5 14 # useless.
philpem@5 15 #
philpem@5 16 # Copyright : David Tschumperle
philpem@5 17 # ( http://www.greyc.ensicaen.fr/~dtschump/ )
philpem@5 18 #
philpem@5 19 # License : CeCILL v2.0
philpem@5 20 # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html )
philpem@5 21 #
philpem@5 22 # This software is governed by the CeCILL license under French law and
philpem@5 23 # abiding by the rules of distribution of free software. You can use,
philpem@5 24 # modify and/ or redistribute the software under the terms of the CeCILL
philpem@5 25 # license as circulated by CEA, CNRS and INRIA at the following URL
philpem@5 26 # "http://www.cecill.info".
philpem@5 27 #
philpem@5 28 # As a counterpart to the access to the source code and rights to copy,
philpem@5 29 # modify and redistribute granted by the license, users are provided only
philpem@5 30 # with a limited warranty and the software's author, the holder of the
philpem@5 31 # economic rights, and the successive licensors have only limited
philpem@5 32 # liability.
philpem@5 33 #
philpem@5 34 # In this respect, the user's attention is drawn to the risks associated
philpem@5 35 # with loading, using, modifying and/or developing or reproducing the
philpem@5 36 # software by the user in light of its specific status of free software,
philpem@5 37 # that may mean that it is complicated to manipulate, and that also
philpem@5 38 # therefore means that it is reserved for developers and experienced
philpem@5 39 # professionals having in-depth computer knowledge. Users are therefore
philpem@5 40 # encouraged to load and test the software's suitability as regards their
philpem@5 41 # requirements in conditions enabling the security of their systems and/or
philpem@5 42 # data to be ensured and, more generally, to use and operate it in the
philpem@5 43 # same conditions as regards security.
philpem@5 44 #
philpem@5 45 # The fact that you are presently reading this means that you have had
philpem@5 46 # knowledge of the CeCILL license and that you accept its terms.
philpem@5 47 #
philpem@5 48
philpem@5 49 #--- About the syntax of this file : ----------------------------------------------------------------------------------
philpem@5 50 #
philpem@5 51 # This file is a regular G'MIC macro file (see G'MIC help for more informations
philpem@5 52 # on writting G'MIC macros). Each line beginning with '#@gimp' defines a filter entry
philpem@5 53 # in the G'MIC Toolbox plug-in for GIMP.
philpem@5 54 #
philpem@5 55 # The general syntax of a '#@gimp' line is :
philpem@5 56 #
philpem@5 57 # '#@gimp "Menu name" : command, preview_command, parameter = typedef, parameter2 = typedef, ...'
philpem@5 58 #
philpem@5 59 # where 'command' is the G'MIC command name called to process the image,
philpem@5 60 # and 'preview_command' is the G'MIC command name called to process the preview.
philpem@5 61 # 'parameter=typedef' tells about the name and types of the filter parameters. 'typedef' can be :
philpem@5 62 #
philpem@5 63 # - 'float(default_value,min_value,max_value)' : add a float slider in the parameters GUI.
philpem@5 64 # - 'int(default_value,min_value,max_value)' : add a int slider in the parameters GUI
philpem@5 65 # - 'bool(default_value)' : add a checkbutton in the parameters GUI.
philpem@5 66 # - 'choice([default_indice],"Choice0","Choice1",...,"ChoiceN")' : add a combobox in the parameters GUI.
philpem@5 67 # - 'text("default text")' : add a text entry in the parameters GUI.
philpem@5 68 # - 'file(["default_filename"])' : add a file chooser button in the parameters GUI.
philpem@5 69 # - 'color(defaultR,defaultG,defaultB[,defaultA])' : add a color chooser button in the parameters GUI.
philpem@5 70 # - 'note("Comment")' : add a comment in the parameters GUI.
philpem@5 71 #
philpem@5 72 # To make '(' or ')' appearing in strings, replace them by '[' and ']'.
philpem@5 73 #
philpem@5 74 #----------------------------------------------------------------------------------------------------------------------
philpem@5 75
philpem@5 76 # Generate a 'no-preview' image.
philpem@5 77 gimp_nopreview :
philpem@5 78 -v- 112x52x1x3 -text[-1] "No preview\navailable",0,0,24,1,255 -r[-1] [-2],0,0,1
philpem@5 79 -f[-2] 0 -point[-2] 50%,50%,0,1,1 -distance[-2] 1 -n[-2] -180,0 -*[-2] -1
philpem@5 80 -or -skip
philpem@5 81
philpem@5 82 # Generate a G'MIC logo image.
philpem@5 83 gmic4gimp_logo :
philpem@5 84 -rm 65x32x1x3 -text G\'MIC,3,2,32,1,1 -r 200x100x1x3x5 -blur 4 -sharpen 5 --f 256 -plasma[-1] 10,3 -n[-1] 0,255
philpem@5 85 -cut 0,255 -* -elevation3d -0.4 230x120x1x3 -r3d 3 -sl3d 0
philpem@5 86 -rotate3d[-2] 1,0,0,10 -*3d[-2] 0.9 -c3d[-2] -object3d[-1] [-2],50%,40%,0,1 -rm[-2] -sqrt -n 0,255
philpem@5 87 -text "Toolbox for GIMP",12%,75%,24,1,255
philpem@5 88
philpem@5 89 # Force the last image to be in RGB format.
philpem@5 90 to_rgb :
philpem@5 91 --dimensions[-1] --[-1] 1
philpem@5 92 -if @{-1,3} --[-1] 1 -if @{-1,3} --[-1] 1 -if @{-1,3} -channels[-2] 0,2 -endif
philpem@5 93 -else -channels[-2] 0 -r[-2] 100%x100%x1x3 -endif -else -r[-2] 100%x100%x1x3
philpem@5 94 -endif -rm[-1]
philpem@5 95
philpem@5 96 #@gimp Tiles
philpem@5 97 #@-----------
philpem@5 98
philpem@5 99 #@gimp Regular tiles : gimp_regular_tile, gimp_regular_tile0, Number of tiles along X = int(2,1,10), Number of tiles along Y = int(2,1,10), Image size = choice("Shrink", "Expand", "Repeat [Memory consuming !]")
philpem@5 100 gimp_regular_tile0 :
philpem@5 101 (100) ($1,$2) -stats[-1] -/[-2] @{-1,1} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -array $1,$2
philpem@5 102 gimp_regular_tile1 :
philpem@5 103 (100) ($1,$2) -stats[-1] -/[-2] @{-1,0} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -array $1,$2
philpem@5 104 gimp_regular_tile2 :
philpem@5 105 -array $1,$2
philpem@5 106 gimp_regular_tile :
philpem@5 107 -gimp_regular_tile$3 $1,$2
philpem@5 108
philpem@5 109 #@gimp Faded tiles : gimp_fade_tile, gimp_fade_tile_preview, Number of tiles along X = int(2,1,10), Number of tiles along Y = int(2,1,10), Image size = choice("Shrink", "Expand", "Repeat [Memory consuming !]"), Fading start = float(80,1,100), Fading end = float(90,1,100)
philpem@5 110 gimp_array_tile :
philpem@5 111 --translate[-1] 50%x50%x1x1,2 -mv[-1] -2 -fade_diamond $3,$4 -array $1,$2
philpem@5 112 gimp_fade_tile0 :
philpem@5 113 (100) ($1,$2) -stats[-1] -/[-2] @{-1,1} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -gimp_array_tile $1,$2,$3,$4
philpem@5 114 gimp_fade_tile1 :
philpem@5 115 (100) ($1,$2) -stats[-1] -/[-2] @{-1,0} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -gimp_array_tile $1,$2,$3,$4
philpem@5 116 gimp_fade_tile2 :
philpem@5 117 -gimp_array_tile $1,$2,$3,$4
philpem@5 118 gimp_fade_tile_preview :
philpem@5 119 -gimp_fade_tile0 $1,$2,$4,$5
philpem@5 120 gimp_fade_tile :
philpem@5 121 -gimp_fade_tile$3 $1,$2,$4,$5
philpem@5 122
philpem@5 123 #@gimp Mirror tiles : gimp_mirror_tile, gimp_mirror_tile0, Number of iterations = int(2,2,10), Expand size = bool(0)
philpem@5 124 gimp_mirror_tile0 :
philpem@5 125 (2) ($1) --[-1] 1 -pow[-2] [-1] -rm[-1] --dimensions[-2] -/[-1] @-2 -r[-3] @{-1,0},@{-1,1},1,100%,2 -rm[-1,-2] -mirror_tile $1
philpem@5 126 gimp_mirror_tile1 :
philpem@5 127 -mirror_tile $1
philpem@5 128 gimp_mirror_tile :
philpem@5 129 -gimp_mirror_tile$2 $1
philpem@5 130
philpem@5 131 #@gimp Image grid : gimp_image_grid, gimp_image_grid, Number of cells along X = int(10,1,100), Number of cells along Y = int(10,1,100)
philpem@5 132 gimp_image_grid :
philpem@5 133 --dimensions (@{-1,0}) (@{-2,1}) -/[-2] $1 -/[-1] $2 -round[-2,-1] 1 -rm[-3] -reverse
philpem@5 134 -grid @-2,@-3 -rm[-3--2]
philpem@5 135
philpem@5 136 #@gimp Tile rotation : gimp_tile_rotation, gimp_tile_rotation, Number of cells along X = int(5,1,80), Number of cells along Y = int(5,1,80), Rotation angle = float(5,0,360)
philpem@5 137 gimp_tile_rotation :
philpem@5 138 --dimensions -mv[-1] -2 -split_tile $1,$2 -rotate[1--1] $3 -append_tile $1,$2 -r[-1] @-2,2 -rm[-2]
philpem@5 139
philpem@5 140 #@gimp Psychedelic faded tiles : gimp_psychetiles, gimp_psychetiles, Number of tiles along X = int(2,1,10), Number of tiles along Y = int(2,1,10), Angle = float(10,0,360), Image size = choice("Shrink", "Expand", "Repeat [Memory consuming !]")
philpem@5 141 _gimp_psychetiles :
philpem@5 142 -fft -translate 50%x50%,0,0,2 -rotate $3 -translate -50%,-50%,0,0,2 -ifft -k[0] -n 0,255 -array $1,$2
philpem@5 143 gimp_psychetiles0 :
philpem@5 144 (100) ($1,$2) -stats[-1] -/[-2] @{-1,1} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -_gimp_psychetiles $1,$2,$3
philpem@5 145 gimp_psychetiles1 :
philpem@5 146 (100) ($1,$2) -stats[-1] -/[-2] @{-1,0} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -_gimp_psychetiles $1,$2,$3
philpem@5 147 gimp_psychetiles2 :
philpem@5 148 -_gimp_psychetiles $1,$2,$3
philpem@5 149 gimp_psychetiles :
philpem@5 150 -gimp_psychetiles$4 $1,$2,$3
philpem@5 151
philpem@5 152 #@gimp Tile normalization : gimp_tile_normalize, gimp_tile_normalize, Number of cells along X = int(25,1,80), Number of cells along Y = int(25,1,80)
philpem@5 153 gimp_tile_normalize :
philpem@5 154 --dimensions -mv[-1] 0 --channels[-1] 0,2 -channels[-2] 3
philpem@5 155 -split_tile $1,$2 -n[2--1] 0,255 -append_tile $1,$2 -mv[-1] -2 -a[-2,-1] v -r[-1] @-2,0,0,0 -rm[-2]
philpem@5 156
philpem@5 157 #@gimp Taquin puzzle : taquin, taquin, Number of X-subdivisions = int(7,1,20), Number of Y-subdivisions = int(7,1,20)
philpem@5 158
philpem@5 159 #@gimp Random array of tiles : gimp_randomtiles, gimp_randomtiles, Number of source tiles along X = int(5,1,20), Number of source tiles along Y = int(5,1,20), Number of destination tiles along X = int(7,1,20), Number of destination tiles along Y = int(7,1,20)
philpem@5 160 gimp_randomtiles :
philpem@5 161 -split_tile $1,$2 ($1) -*[-1] $2
philpem@5 162 -repeat $3 -repeat $4 (@?) -*[-1] @-2 -round[-1] 1 -i[-3] [@-1] -rm[-1] -done -done
philpem@5 163 --[-1] 1 -rm[0-@-1] -rm[-1] -append_tile $3,$4
philpem@5 164
philpem@5 165 #@gimp Tiles to layers : gimp_tile2layers, gimp_tile2layers_preview, Number of tiles along X = int(2,1,100), Number of tiles along Y = int(2,1,100)
philpem@5 166 gimp_tile2layers :
philpem@5 167 -split_tile $1,$2
philpem@5 168
philpem@5 169 gimp_tile2layers_preview :
philpem@5 170 -split_tile $1,$2 -k[50%]
philpem@5 171
philpem@5 172 #@gimp _Frames
philpem@5 173 #--------------
philpem@5 174
philpem@5 175 #@gimp Regular frame : gimp_color_frame, gimp_color_frame, Frame width = float(20,0,100), Frame height = float(20,0,100), Frame color = color(255,255,255,255), Keep original size = bool(0)
philpem@5 176 gimp_color_frame :
philpem@5 177 --dimensions -mv[-1] 0
philpem@5 178 --r[-1] $1%x100%x1x100%,0 ($3^$4^$5^$6) -r[-1] [-2],1 -rm[-2] [-1] -mv[-1] -3 -a[-3--1] x
philpem@5 179 --r[-1] 100%x$2%x1x100%,0 ($3^$4^$5^$6) -r[-1] [-2],1 -rm[-2] [-1] -mv[-1] -3 -a[-3--1] y
philpem@5 180 -if $7 -r[-1] @-2,2 -endif -rm[0]
philpem@5 181
philpem@5 182 #@gimp Fuzzy frame : gimp_frame_fuzzy, gimp_frame_fuzzy, Frame width = float(20,0,100), Frame height = float(20,0,100), Frame fuzzyness = float(10,0,40), Frame smoothness = float(1,0,5), Frame shading = float(1,0,5), Frame color = color(255,255,255,255)
philpem@5 183 gimp_frame_fuzzy :
philpem@5 184 100%x100%x1x1
philpem@5 185 -polygon[-1] 4,0,0,100%,0,100%,$2%,0,$2%,1,1
philpem@5 186 -polygon[-1] 4,0,0,$1%,0,$1%,100%,0,100%,1,1
philpem@5 187 --mirror[-1] x -mirror[-1] y -or[-2,-1]
philpem@5 188 -spread $3 -blur[-1] $4 -threshold[-1] 50% -blur[-1] $5 -n[-1] 0,1
philpem@5 189 -r[-1] [-2],1
philpem@5 190 --*[-1] -1 -+[-1] 1 -*[-3,-1]
philpem@5 191 ($6^$7^$8^$9) -r[-1] 1x1x1x[-2],0 -r[-1] [-2],1 -*[-2,-1]
philpem@5 192 -+[-2,-1]
philpem@5 193
philpem@5 194 #@gimp _Textures and patterns
philpem@5 195 #----------------------------
philpem@5 196
philpem@5 197 #@gimp Random puzzle : gimp_puzzle, gimp_puzzle, Scale = float(10,0,100)
philpem@5 198 gimp_puzzle :
philpem@5 199 [-1] -r[-1] $1x$1x100%x100%x2 -noise[-1] 0.1 -r[-1] [-2] -rm[-2]
philpem@5 200 [-1]x2 -translate[-1] 1,1 --[-2,-1] -norm[-1] -threshold[-1] 0.01 -*[-1] -1
philpem@5 201 -+[-1] 1 -r[-1] [-2] -*[-1,-2] 10%x10%x10%x2 -noise[-1] 5,1
philpem@5 202 -r[-1] [-2],[-2],1,2,5 -warp[-2] [-1],1,1,1 -rm[-1]
philpem@5 203
philpem@5 204 #@gimp Mosaic pattern : mosaic, mosaic, Density = float(2,0.1,10)
philpem@5 205
philpem@5 206 #@gimp Whirls texture : whirls, whirls
philpem@5 207
philpem@5 208 #@gimp Paper texture : paper_texture, paper_texture
philpem@5 209
philpem@5 210 #@gimp Hearts : gimp_hearts, gimp_hearts, Density = float(10,0,100)
philpem@5 211 gimp_hearts :
philpem@5 212 100%x100%x1 -noise[-1] $1,2 -r[-1] [-2] -n[-1] 0,1 -*[-1,-2] -_heart9x7
philpem@5 213 -mirror[-1] y -dilate[-2] [-1] -rm[-1]
philpem@5 214
philpem@5 215 #@gimp _Artistic
philpem@5 216 #----------------
philpem@5 217 #@gimp Polaroid : gimp_polaroid, gimp_polaroid, Frame border size = int(20,1,400), Bottom border size = int(120,1,400), Background size = int(20,1,400), Rotation angle = float(20,0,360), note = note("\n\n<small><b>Note :</b> All sizes are expressed in numbers of pixels.</small>")
philpem@5 218 gimp_polaroid :
philpem@5 219 -polaroid $1,$2,$3 -rotate $4,1
philpem@5 220
philpem@5 221 #@gimp Old photograph : old_photo, old_photo
philpem@5 222
philpem@5 223 #@gimp Drop shadow : gimp_drop_shadow, gimp_drop_shadow, Image elevation = int(10,0,25), Shadow smoothness = float(10,0,20), Rotation angle = float(20,0,360), Shadow position = choice("Bottom right", "Bottom left", "Up right", "Up left")
philpem@5 224 gimp_drop_shadow0 :
philpem@5 225 -translate[-3,-2] $1,$1,0,0,1
philpem@5 226 gimp_drop_shadow1 :
philpem@5 227 -translate[-3,-2] -$1,$1,0,0,1
philpem@5 228 gimp_drop_shadow2 :
philpem@5 229 -translate[-3,-2] $1,-$1,0,0,1
philpem@5 230 gimp_drop_shadow3 :
philpem@5 231 -translate[-3,-2] -$1,-$1,0,0,1
philpem@5 232 gimp_drop_shadow :
philpem@5 233 --f[-1] 0 --[-1] 255 -r[-2,-1] 150%x150%x1x100%,0,0,1 -+[-1] 255 --blur[-1] $2 -gimp_drop_shadow$4 $1
philpem@5 234 -*[-2,-1] -n[-1] 0,255 -+[-2,-1] -rotate $3,1
philpem@5 235
philpem@5 236 #@gimp Sponge effect : sponge, sponge, Sponge size = int(13,3,21)
philpem@5 237
philpem@5 238 #@gimp Color ellipses : gimp_color_ellipses, gimp_color_ellipses, Opacity = float(0.07,0.01,0.5)
philpem@5 239 gimp_color_ellipses :
philpem@5 240 -to_rgb -color_ellipses $1
philpem@5 241
philpem@5 242 #@gimp Edges : gimp_edges, gimp_edges, Edge threshold = float(30,0,150)
philpem@5 243 gimp_edges :
philpem@5 244 -to_rgb -edges $1
philpem@5 245
philpem@5 246 #@gimp Cartoon : gimp_cartoon, gimp_cartoon, Edge threshold = float(30,0,150), Smoothness = float(1,0,10)
philpem@5 247 gimp_cartoon :
philpem@5 248 -to_rgb [-1]x2 -edges $1 -r[-2] 8x8x1x3,2 -r[-3] 100%x100%x100%x3
philpem@5 249 -rgb2lut[-3] [-2] -lut2rgb[-3] [-2] -rm[-2] -blur[-2] $2 -*[-2--1] -n[-1] 0,255
philpem@5 250
philpem@5 251 #@gimp Pen drawing : gimp_pen_drawing, gimp_pen_drawing
philpem@5 252 gimp_pen_drawing :
philpem@5 253 -to_rgb -drawing
philpem@5 254
philpem@5 255 #@gimp Whirl drawing : draw_whirl, draw_whirl
philpem@5 256
philpem@5 257 #@gimp Cubism : gimp_cubism, gimp_cubism, Iterations = int(1000,1,3000), Bloc size = float(3,0,10), Maximum angle = float(90,0,360), Opacity = float(0.7,0.01,1), Smoothness = float(0,0,5)
philpem@5 258 gimp_cubism :
philpem@5 259 --dimensions -*[-1] $2 -/[-1] 100 -stats[-1] -round[-1] 1 -mv[-1] 0 -cubism $1,@{-2,1},$3,$4,$5 -rm[0]
philpem@5 260
philpem@5 261 #@gimp BW stencil : gimp_stencilbw, gimp_stencilbw, Edge threshold = float(30,0,150), Smoothness = float(10,0,30)
philpem@5 262 gimp_stencilbw :
philpem@5 263 -r[-1] 100%x100%x1x100% -t float [-1] -edges $1 -quantize[-2] 3 -blur[-2] $2
philpem@5 264 -sharpen[-2] 1000000 -norm[-2] -n[-2] 0,1 -*[-1,-2] -n[-1] 0,255
philpem@5 265
philpem@5 266 #@gimp BW pencil : gimp_pencilbw, gimp_pencilbw, Pencil type = float(0.3,0,5), Amplitude = float(60,0,200)
philpem@5 267 gimp_pencilbw :
philpem@5 268 -to_rgb -norm -blur $1 -sharpen 4000 -smooth $2,0,1 -equalize 256
philpem@5 269 -sqrt -n 0,255 -r 100%x100%x1x3
philpem@5 270
philpem@5 271 #@gimp BW dots : dotsbw, gimp_dotsbw_preview
philpem@5 272 gimp_dotsbw_preview :
philpem@5 273 -r 300%x300%x1x3,3 -dotsbw
philpem@5 274
philpem@5 275 #@gimp BW dithering : ditheredbw, ditheredbw
philpem@5 276
philpem@5 277 #@gimp Warhol artwork : warhol, warhol, Number of tiles along X = int(3,1,10), Number of tiles along Y = int(3,1,10)
philpem@5 278
philpem@5 279 #@gimp Soft glow : glow, glow, Amplitude = float(3,0,10)
philpem@5 280
philpem@5 281 #@gimp Difference of Gaussians : gimp_dog, gimp_dog, Alpha = float(3,0,10), Beta = float(3.2,0,10)
philpem@5 282 gimp_dog :
philpem@5 283 -dog $1,$2 -n 0,255
philpem@5 284
philpem@5 285 #@gimp Tetris effect : gimp_tetris, gimp_tetris, Scale = int(10,1,100)
philpem@5 286 gimp_tetris :
philpem@5 287 -to_rgb -tetris $1
philpem@5 288
philpem@5 289 #@gimp _Deformations
philpem@5 290 #-------------------
philpem@5 291
philpem@5 292 #@gimp Water : water, water, Amplitude = float(30,0,300), Smoothness = float(1.5,0,4)
philpem@5 293
philpem@5 294 #@gimp Water reflection : gimp_reflect, gimp_reflect
philpem@5 295 gimp_reflect :
philpem@5 296 -to_rgb -reflect
philpem@5 297
philpem@5 298 #@gimp Wave effect : gimp_wave, gimp_wave, Amplitude = float(10,0,30) Frequency = float(0.4,0,2), X-center = float(50,0,100), Y-center = float(50,0,100)
philpem@5 299 gimp_wave :
philpem@5 300 100%x100% -=[-1] 1,$3%,$4% -distance[-1] 1
philpem@5 301 -*[-1] $2 --sin[-1] -cos[-2] -a[-2,-1] v -*[-1] $1
philpem@5 302 -warp[-2] [-1],1 -rm[-1]
philpem@5 303
philpem@5 304 #@gimp Random deformation : deform, deform, Amplitude = float(10,0,200)
philpem@5 305
philpem@5 306 #@gimp Fish-eye : fish_eye, fish_eye, Amplitude = float(250,0,1000)
philpem@5 307
philpem@5 308 #@gimp _Degradations
philpem@5 309 #--------------------
philpem@5 310
philpem@5 311 #@gimp Noise : gimp_noise, gimp_noise, Amplitude = float(30,0,200), Noise type = choice("Gaussian","Uniform","Salt and pepper","Poisson"), Value range = choice("Cut","Normalize"), Channels = choice("RGB[A]","Luminance","Blue and Red chrominances","Blue chrominance","Red chrominance")
philpem@5 312 gimp_noise0 :
philpem@5 313 -noise[-1] $1,$2
philpem@5 314 gimp_noise1 :
philpem@5 315 -to_rgb -rgb2ycbcr -s v -noise[-3] $1,$2 -a v -ycbcr2rgb
philpem@5 316 gimp_noise2 :
philpem@5 317 -to_rgb -rgb2ycbcr -s v -noise[-2,-1] $1,$2 -a v -ycbcr2rgb
philpem@5 318 gimp_noise3 :
philpem@5 319 -to_rgb -rgb2ycbcr -s v -noise[-2] $1,$2 -a v -ycbcr2rgb
philpem@5 320 gimp_noise4 :
philpem@5 321 -to_rgb -rgb2ycbcr -s v -noise[-1] $1,$2 -a v -ycbcr2rgb
philpem@5 322 gimp_noise :
philpem@5 323 -gimp_noise$4 $1,$2 -if $3 -n 0,255 -else -cut 0,255 -endif
philpem@5 324
philpem@5 325 #@gimp Random shade stripes : gimp_shade_stripes, gimp_shade_stripes, Frequency = float(30,1,100), Stripes orientation = choice(Horizontal,Vertical), Darkness = float(0.8,0,3), Lightness = float(2,0,3)
philpem@5 326 gimp_shade_stripes :
philpem@5 327 -n 0,255
philpem@5 328 -if $2 100% -else 1x100% -endif
philpem@5 329 -noise[-1] $1,2 -distance[-1] 1
philpem@5 330 -r[-1] [-2] -n[-1] $3,$4 -*[-1,-2] -cut[-1] 0,255
philpem@5 331
philpem@5 332 #@gimp Old-movie stripes : stripesy, stripesy, Frequency = float(10,0,100)
philpem@5 333
philpem@5 334 #@gimp Damp patch : damp_patch, damp_patch, Opacity = float(0.7,0,1)
philpem@5 335
philpem@5 336 #@gimp Light patch : light_patch, light_patch, Darkness = float(0.7,0,1), Lightness = float(2.5,1,4)
philpem@5 337
philpem@5 338 #@gimp _Image enhancement
philpem@5 339 #-------------------------
philpem@5 340
philpem@5 341 #@gimp Anisotropic smoothing : gimp_anisotropic_filter, gimp_anisotropic_filter, Amplitude = float(60,0,1000), Edge preservation = float(0.7,0,2), Anisotropy = float(0.3,0,1), Gradient smoothness = float(0.6,0,10), Tensor smoothness = float(1.1,0,10), Spatial precision = float(0.8,0.1,2), Angular precision = float(30,1,180), Value precision = float(2,0.1,5), Interpolation type = choice("Nearest neighbor","Linear","Runge-Kutta"), Fast gaussian approximation = bool(1), Number of iterations = int(1,1,10), Channels processing = choice("RGB","Luminance","Blue and Red chrominances","Blue chrominance","Red chrominance"), Tile subdivisions = int(1,1,10), note = note("\n<small><b>Note : </b>This filter is a part of the <b>GREYCstoration</b> framework, see :\n<i>http://cimg.sourceforge.net/greycstoration/</i> for more details about it.</small>")
philpem@5 342 # RGB version
philpem@5 343 gimp_anisotropic_filter0 :
philpem@5 344 -split_tile $12,$12 -repeat $11 -smooth $1,$2,$3,$4,$5,$6,$7,$8,$9,$10 -done -append_tile $12,$12 -cut 0,255
philpem@5 345 # Luminance version
philpem@5 346 gimp_anisotropic_filter1 :
philpem@5 347 -rgb2ycbcr -s v -repeat $11 -smooth[-3] $1,$2,$3,$4,$5,$6,$7,$8,$9,$10 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 348 # Chrominance version
philpem@5 349 gimp_anisotropic_filter2 :
philpem@5 350 -rgb2ycbcr -s v -repeat $11 -smooth[-2,-1] $1,$2,$3,$4,$5,$6,$7,$8,$9,$10 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 351 # Blue chrominance version
philpem@5 352 gimp_anisotropic_filter3 :
philpem@5 353 -rgb2ycbcr -s v -repeat $11 -smooth[-2] $1,$2,$3,$4,$5,$6,$7,$8,$9,$10 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 354 # Red chrominance version
philpem@5 355 gimp_anisotropic_filter4 :
philpem@5 356 -rgb2ycbcr -s v -repeat $11 -smooth[-1] $1,$2,$3,$4,$5,$6,$7,$8,$9,$10 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 357 # Generic version
philpem@5 358 gimp_anisotropic_filter :
philpem@5 359 -gimp_anisotropic_filter$12 $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$13
philpem@5 360
philpem@5 361 #@gimp Patch-based smoothing : gimp_patch_filter, gimp_patch_filter, Patch size = int(3,2,21), Lookup size = int(5,2,21), Patch variance = float(10,0.1,200), Value variance = float(10,0.1,200), Number of iterations = int(1,1,10), Channels processing = choice("RGB","Luminance","Blue and Red chrominances","Blue chrominance","Red chrominance"), note = note("\n<small><b>Note : </b>This filter is a part of the <b>GREYCstoration</b> framework, see :\n<i>http://cimg.sourceforge.net/greycstoration/</i> for more details about it.</small>")
philpem@5 362 # RGB version
philpem@5 363 gimp_patch_filter0 :
philpem@5 364 -repeat $5 -denoise $4,$3,$1,$2 -done -cut 0,255
philpem@5 365 # Luminance version
philpem@5 366 gimp_patch_filter1 :
philpem@5 367 -rgb2ycbcr -s v -repeat $5 -denoise[-3] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 368 # Chrominance version
philpem@5 369 gimp_patch_filter2 :
philpem@5 370 -rgb2ycbcr -s v -repeat $5 -denoise[-2,-1] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 371 # Blue chrominance version
philpem@5 372 gimp_patch_filter3 :
philpem@5 373 -rgb2ycbcr -s v -repeat $5 -denoise[-2] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 374 # Red chrominance version
philpem@5 375 gimp_patch_filter4 :
philpem@5 376 -rgb2ycbcr -s v -repeat $5 -denoise[-1] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
philpem@5 377 # Generic version
philpem@5 378 gimp_patch_filter :
philpem@5 379 -gimp_patch_filter$6 $1,$2,$3,$4,$5
philpem@5 380
philpem@5 381 #@gimp Bilateral filtering : gimp_bilateral, gimp_bilateral, Spatial variance = float(40,0,100), Value variance = float(30,0,100), Number of iterations = int(1,1,10)
philpem@5 382 gimp_bilateral :
philpem@5 383 -repeat $3 -bilateral $1,$2 -done
philpem@5 384
philpem@5 385 #@gimp Mean-curvature regularization : gimp_meancurvature_flow, gimp_meancurvature_flow, Number of iterations = int(4,1,10), Time step = float(30,5,50)
philpem@5 386 gimp_meancurvature_flow :
philpem@5 387 -meancurvature_flow $1,$2 -cut 0,255
philpem@5 388
philpem@5 389 #@gimp TV regularization : gimp_tvflow, gimp_tvflow, Number of iterations = int(4,1,40), Time step = float(30,5,100)
philpem@5 390 gimp_tvflow :
philpem@5 391 -tv_flow $1,$2 -cut 0,255
philpem@5 392
philpem@5 393 #@gimp Inverse diffusion sharpening : gimp_sharpen0, gimp_sharpen0, Amplitude = float(50,1,300), Number of iterations = int(2,1,10)
philpem@5 394 gimp_sharpen0 :
philpem@5 395 -repeat $2 -sharpen $1,0 -done -cut 0,255
philpem@5 396
philpem@5 397 #@gimp Shock filters sharpening : gimp_sharpen1, gimp_sharpen1, Amplitude = float(150,1,400), Edge threshold = float(0.1,0,0.7), Gradient smoothness = float(0.8,0,10), Tensor smoothness = float(1.1,0,10), Number of iterations = int(1,1,10)
philpem@5 398 gimp_sharpen1 :
philpem@5 399 -repeat $5 -sharpen $1,1,$2,$3,$4 -done -cut 0,255
philpem@5 400
philpem@5 401 #@gimp Deinterlace : gimp_deinterlace, gimp_deinterlace0, Method = choice("Simple","Motion-compensated")
philpem@5 402 gimp_deinterlace0 :
philpem@5 403 -deinterlace 0
philpem@5 404 gimp_deinterlace :
philpem@5 405 -deinterlace $1
philpem@5 406
philpem@5 407 #@gimp _Rendering and synthesis
philpem@5 408 #-------------------------------
philpem@5 409
philpem@5 410 #@gimp 3D elevation [static] : gimp_elevation, gimp_elevation_preview, Rendering width = int(512,8,1024), Rendering height = int(512,8,1024), Value scale = float(-0.15,-0.7,0.7), Map smoothness = float(1,0,10), Background color = color(255,255,255), X-angle = float(70,0,360), Y-angle = float(20,0,360), Zoom = float(1,0.1,4), Rendering type = choice(4,"Points","Lines","Flat","Flat shaded","Gouraud","Phong"), Opacity = float(1,0,1), Focale = float(500,100,800)
philpem@5 411 gimp_elevation :
philpem@5 412 -to_rgb --blur $4 -*[-1] $3 -r $1,$2,1,-100,2 -elevation3d[0] [-1] -rm[1] -c3d[-1] -r3d $11 -f3d $13
philpem@5 413 ($5^$6^$7) -r[-1] $1x$2x1x3
philpem@5 414 -rot3d[0] 0,0,1,$9 -rot3d[0] 1,0,0,$8 -*3d[0] $10 -object3d[-1] [0],50%,50%,0,$12 -rm[0]
philpem@5 415
philpem@5 416 gimp_elevation_preview :
philpem@5 417 -to_rgb --blur $4 -*[-1] $3 -r 200,200,1,-100,2 -elevation3d[0] [-1] -rm[-1] -c3d[-1] -r3d $11 -f3d $13
philpem@5 418 ($5^$6^$7) -r[-1] 200x200x1x3
philpem@5 419 -rot3d[0] 0,0,1,$9 -rot3d[0] 1,0,0,$8 -*3d[0] $10 -object3d[-1] [0],50%,50%,0,$12 -rm[0]
philpem@5 420
philpem@5 421 #@gimp 3D elevation [animated] : gimp_elevation_anim, gimp_elevation_anim_preview, Rendering width = int(512,8,1024), Rendering height = int(512,8,1024), Value scale = float(-0.15,-0.7,0.7), Map smoothness = float(1,0,10), Background color = color(255,255,255), X-angle = float(70,0,360), Rotation step = float(5,1,360), Zoom = float(1,0.1,4), Rendering type = choice(4,"Points","Lines","Flat","Flat shaded","Gouraud","Phong"), Opacity = float(1,0,1), Number of frames = int(10,1,360), Focale = float(500,100,800)
philpem@5 422 gimp_elevation_anim :
philpem@5 423 -to_rgb --blur $4 -*[1] $3 -r $1,$2,1,-100,2 -elevation3d[0] [1] -rm[1] -c3d[-1] -r3d $11 -f3d $14
philpem@5 424 -repeat $13
philpem@5 425 ($5^$6^$7) -r[-1] $1x$2x1x3
philpem@5 426 --rot3d[0] 1,0,0,$8 -*3d[-1] $10 -object3d[-2] [-1],50%,50%,0,$12 -rm[-1] -rot3d[0] 0,0,1,$9 -done -rm[0]
philpem@5 427
philpem@5 428 gimp_elevation_anim_preview :
philpem@5 429 -to_rgb --blur $4 -*[1] $3 -r 200,200,1,-100,2 -elevation3d[-2] [-1] -rm[-1] -c3d[-1] -r3d $11 -f3d $14
philpem@5 430 ($5^$6^$7) -r[-1] 200x200x1x3
philpem@5 431 -rot3d[0] 1,0,0,$8 -*3d[0] $10 -object3d[-1] [0],50%,50%,0,$12 -rm[0]
philpem@5 432
philpem@5 433 #@gimp Image cube : gimp_imagecube3d, gimp_imagecube3d, Rendering size = int(512,1,1024), Image resolution = int(128,1,512), Cube size = float(256,0,512), X-angle = float(57,0,360), Y-angle = float(41,0,360), Z-angle = float(21,0,360), Background type = choice(1,"Color","Plasma"), Background color = color(255,255,255)
philpem@5 434 _gimp_imagecube3d0 : ($1^$2^$3) -r[-1] [-2],1 -rm[-2]
philpem@5 435 _gimp_imagecube3d1 : -plasma[-1] 10,10 -n[-1] 0,128 -skip $*
philpem@5 436 gimp_imagecube3d :
philpem@5 437 -to_rgb -imagecube3d $2 -*3d $3 -rot3d 0,0,1,$6 -rot3d 0,1,0,$5 -rot3d 1,0,0,$4 $1x$1x1x3
philpem@5 438 -_gimp_imagecube3d$7 $8,$9,$10 -r3d 2 -o3d -object3d[1] [0],50%,50% -k[1]
philpem@5 439
philpem@5 440 #@gimp Random 3D objects : gimp_random3d, gimp_random3d, Type of objects = choice("Cube","Cone","Cylinder","Sphere","Torus"), Number of objects = int(50,1,300), Object size = float(3,1,20), Z-range = float(100,0,300), Rendering type = choice(3,"Points","Lines","Flat","Flat shaded","Gouraud","Phong"), Opacity = float(1,0,1)
philpem@5 441 _gimp_random3d0 : -cube3d $1
philpem@5 442 _gimp_random3d1 : ($1) -/[-1] 2 -cone3d @-1,$1 -rm[-2]
philpem@5 443 _gimp_random3d2 : ($1) -/[-1] 2 -cylinder3d @-1,$1 -rm[-2]
philpem@5 444 _gimp_random3d3 : -sphere3d $1,2
philpem@5 445 _gimp_random3d4 : ($1) -/[-1] 3 -torus3d $1,@-1 -rm[-2]
philpem@5 446 gimp_random3d :
philpem@5 447 -to_rgb --dimensions -/[-1] 2 -repeat $2
philpem@5 448 (@{1,0}) -+[-1] @{1,1} -*[-1] $3 -/[-1] 100 -p[-1] -v- -_gimp_random3d$1 @-1 -rm[-2]
philpem@5 449 -rot3d[-1] 1,1,0,@{?,0,360}
philpem@5 450 (@{?,-1,1}) -*[-1] @{1,0} (@{?,-1,1}) -*[-1] @{1,1}
philpem@5 451 -+3d[-3] @-2,@-1,@{?,-$4,$4} -rm[-2,-1]
philpem@5 452 -col3d[-1] @{?,255},@{?,255},@{?,255} -done -+3d[2--1] -r3d $5 -o3d -object3d[0] [-1],50%,50%,0,$6
philpem@5 453 -k[0]
philpem@5 454
philpem@5 455 #@gimp Mandelbrot fractal : gimp_mandelbrot, gimp_mandelbrot, X-origin = float(0,-2,2), Y-origin = float(0,-2,2), X-range = float(2,0,2), Y-range = float(2,0,2), Number of iterations = int(128,1,512), Fractal set = choice(Mandelbrot, Julia), X-seed = float(0,-2,2), Y-seed = float(0,-2,2), Palette = choice(Grayscale,Blue,Hot,Clusters)
philpem@5 456 gimp_mandelbrot :
philpem@5 457 ($1) --[-1] $3 ($2) --[-1] $4 ($1) -+[-1] $3 ($2) -+[-1] $4 -a[-4--1] x
philpem@5 458 -mandelbrot[-2] @-1,$5,$6,$7,$8 -rm[-1]
philpem@5 459 -if $9 ($9) --[-1] 1 -lut2rgb[-2] @-1 -rm[-1] -else -norm -n 0,255 -endif
philpem@5 460
philpem@5 461 #@gimp _Selections
philpem@5 462 #------------------
philpem@5 463 #@gimp Global RGB selection : gimp_selectrgb, gimp_selectrgb, Selected color = color(255,255,255), Tolerance = float(100,1,450)
philpem@5 464 gimp_selectrgb :
philpem@5 465 -to_rgb -select_rgb $1,$2,$3,$4 -n 0,255
philpem@5 466
philpem@5 467 #@gimp _Bulk filters
philpem@5 468 #--------------------
philpem@5 469 #@gimp Fourier transform (centered log-module) : gimp_fourier, gimp_fourier
philpem@5 470 gimp_fourier :
philpem@5 471 -fft -sqr -+ -sqrt -+ 1 -log -translate 50%,50%,0,0,2 -n 0,255
philpem@5 472
philpem@5 473 #@gimp Import image data : gimp_import_image, gimp_import_image, Filename = file(), Enable normalization = bool(1), note = note("\n<small><b>Note : </b>This filter may be useful to import image data with exotic formats : Pandore, CImg, Inrimage, ...</small>")
philpem@5 474 gimp_import_image :
philpem@5 475 -rm $1 -s z -if $2 -n 0,255 -else -cut 0,255 -endif -p
philpem@5 476
philpem@5 477 #@gimp Custom G'MIC command : gimp_custom, gimp_custom, Command = text("--blur 2 -xor"), note = note("\n<small><b>Note : </b>This filter can execute any command understood by the G'MIC interpreter. You can then test some commands before creating your own G'MIC macros and menu entries.</small>")
philpem@5 478 gimp_custom :
philpem@5 479 -nop
philpem@5 480
philpem@5 481 #@gimp _Additionnal informations
philpem@5 482 #--------------------------------
philpem@5 483 #@gimp About the G'MIC Toolbox : nop, gmic4gimp_logo, note = note("\n<b>The G'MIC Toolbox for GIMP</b>\n[ <b>G</b>REYC's <b>M</b>agic <b>I</b>mage <b>C</b>onverter, <i>version 1.3.0.3]</i>\n\n written by <i>David Tschumperle</i>\n\nThis plug-in is based on the libraries <i>G'MIC</i> and <i>CImg\n[C++ Template Image Processing Library]</i>, available at :\n\n - http://gmic.sourceforge.net/ - and\n - http://cimg.sourceforge.net/ -\n\nAll code and libraries are open-source and have been developed in the <i>Image Team</i> at the <i>GREYC Laboratory</i> - CNRS UMR 6072 - in Caen/France.\n\n<small>If you enjoy using G'MIC, it would be nice to send us a nice postcard\nfrom your place at the following address :\n\n<tt> David Tschumperle, GREYC Image,\n 6 Bd du Marechal Juin, 14050 Caen Cedex / France.</tt></small>")
philpem@5 484
philpem@5 485 #@gimp Release notes : nop, gmic4gimp_logo, note = note("- <b>2009/01/13</b> : version <i>1.3.0</i> [Initial].\n- <b>2009/01/16</b> : version <i>1.3.0.1</i>.\n- <b>2009/01/22</b> : version <i>1.3.0.2</i>.\n- <b>2009/01/26</b> : version <i>1.3.0.3</i>.\n- <b>2009/02/20</b> : version <i>1.3.0.4</i> [current].")
philpem@5 486
philpem@5 487 #@gimp Adding user-defined filters : nop, gmic4gimp_logo, note = note("It is possible to add your own <b>user-defined filters</b> to the G'MIC Toolbox :\n\nCreate a <i>.gmic4gimp</i> text file in your home directory [or appdata directory on Windows]. The plug-in will read it\neach time it is called. This file must be a regular\n<b>G'MIC macro file</b> containing your filter definitions that\nwill be added to the list of existing ones.\nLook at the default filters file :\n\n<small><i>http://gmic.sourceforge.net/.gmic4gimp_def</i></small>\n\n ...to see how existing filters have been defined and \nadded to the G'MIC Toolbox. Writting a new filter can be generally done in very few lines with G'MIC.\n\n<small><b>Example</b> of a valid <i>.gmic4gimp</i> file :\n\n<tt>#@gimp My effect : my_effect, my_effect, Sigma = float[2,0,10]\nmy_effect :\n --blur $1 -n 0,255 -xor</tt>\n\nBy the way, you are welcome to submit and share your nice custom filters on the G'MIC webpage forums.</small>")
philpem@5 488
philpem@5 489 #@gimp Updating existing G'MIC filters : nop, gmic4gimp_logo, note = note("The G'MIC Toolbox is able to <b>update</b> his list of filters definitions. Click on the <i>Update Filters</i> button on the\nleft pane to connect to the server and download\nthe update file.\n\n Basically, the update procedure downloads a file\n<i>.gmic4gimp_def.xxxx</i> into your home directory [or appdata directory on Windows] where <i>xxxx</i> are the four digits\nof the version number of your G'MIC plug-in.\nYou can manually install the update file from :\n\n<small><i>http://www.greyc.ensicaen.fr/~dtschump/gmic4gimp_def.xxxx</i></small>\n\nJust copy and rename this file as your file\n<i>.gmic4gimp_def.xxxx</i> and the update is done.\nBy the way, removing this local file also resets all the\nfilter definitions to their initial state.")
philpem@5 490
philpem@5 491 #@gimp Initial G'MIC filters
philpem@5 492 #----------------------------
philpem@5 493 #@gimp About this section : nop, gmic4gimp_logo, note = note("This section contains all the <i>initial</i> definitions of the filters from the G'MIC Toolbox, i.e. the ones defined at the latest release date. If no filters appear below, then you did not update your filter list yet.")
philpem@5 494
philpem@5 495 # Local Variables:
philpem@5 496 # mode: sh
philpem@5 497 # End:
philpem@5 498 #
philpem@5 499 # (End of G'MIC macro file)
philpem@5 500