Wed, 05 Aug 2009 15:02:31 +0100
PTdecode: add support for uncompressed data (NOTE: *NOT* supported by the PT-2450DX)
1 #@gimp
2 #
3 # File : gmic4gimp_def.raw
4 # ( G'MIC for GIMP default macros and menu entries)
5 #
6 # Description : Define menu entries for the GIMP plug-in.
7 # ( http://gmic.sourceforge.net )
8 # This file is also a part of the CImg Library project.
9 # ( http://cimg.sourceforge.net )
10 #
11 # Note : This file is here for illustration purposes, since commands defined in
12 # the default macro file are already present by default in G'MIC.
13 # Then, explicit inclusion of this file (using the '-m' option) if
14 # useless.
15 #
16 # Copyright : David Tschumperle
17 # ( http://www.greyc.ensicaen.fr/~dtschump/ )
18 #
19 # License : CeCILL v2.0
20 # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html )
21 #
22 # This software is governed by the CeCILL license under French law and
23 # abiding by the rules of distribution of free software. You can use,
24 # modify and/ or redistribute the software under the terms of the CeCILL
25 # license as circulated by CEA, CNRS and INRIA at the following URL
26 # "http://www.cecill.info".
27 #
28 # As a counterpart to the access to the source code and rights to copy,
29 # modify and redistribute granted by the license, users are provided only
30 # with a limited warranty and the software's author, the holder of the
31 # economic rights, and the successive licensors have only limited
32 # liability.
33 #
34 # In this respect, the user's attention is drawn to the risks associated
35 # with loading, using, modifying and/or developing or reproducing the
36 # software by the user in light of its specific status of free software,
37 # that may mean that it is complicated to manipulate, and that also
38 # therefore means that it is reserved for developers and experienced
39 # professionals having in-depth computer knowledge. Users are therefore
40 # encouraged to load and test the software's suitability as regards their
41 # requirements in conditions enabling the security of their systems and/or
42 # data to be ensured and, more generally, to use and operate it in the
43 # same conditions as regards security.
44 #
45 # The fact that you are presently reading this means that you have had
46 # knowledge of the CeCILL license and that you accept its terms.
47 #
49 #--- About the syntax of this file : ----------------------------------------------------------------------------------
50 #
51 # This file is a regular G'MIC macro file (see G'MIC help for more informations
52 # on writting G'MIC macros). Each line beginning with '#@gimp' defines a filter entry
53 # in the G'MIC Toolbox plug-in for GIMP.
54 #
55 # The general syntax of a '#@gimp' line is :
56 #
57 # '#@gimp "Menu name" : command, preview_command, parameter = typedef, parameter2 = typedef, ...'
58 #
59 # where 'command' is the G'MIC command name called to process the image,
60 # and 'preview_command' is the G'MIC command name called to process the preview.
61 # 'parameter=typedef' tells about the name and types of the filter parameters. 'typedef' can be :
62 #
63 # - 'float(default_value,min_value,max_value)' : add a float slider in the parameters GUI.
64 # - 'int(default_value,min_value,max_value)' : add a int slider in the parameters GUI
65 # - 'bool(default_value)' : add a checkbutton in the parameters GUI.
66 # - 'choice([default_indice],"Choice0","Choice1",...,"ChoiceN")' : add a combobox in the parameters GUI.
67 # - 'text("default text")' : add a text entry in the parameters GUI.
68 # - 'file(["default_filename"])' : add a file chooser button in the parameters GUI.
69 # - 'color(defaultR,defaultG,defaultB[,defaultA])' : add a color chooser button in the parameters GUI.
70 # - 'note("Comment")' : add a comment in the parameters GUI.
71 #
72 # To make '(' or ')' appearing in strings, replace them by '[' and ']'.
73 #
74 #----------------------------------------------------------------------------------------------------------------------
76 # Generate a 'no-preview' image.
77 gimp_nopreview :
78 -v- 112x52x1x3 -text[-1] "No preview\navailable",0,0,24,1,255 -r[-1] [-2],0,0,1
79 -f[-2] 0 -point[-2] 50%,50%,0,1,1 -distance[-2] 1 -n[-2] -180,0 -*[-2] -1
80 -or -skip
82 # Generate a G'MIC logo image.
83 gmic4gimp_logo :
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
85 -cut 0,255 -* -elevation3d -0.4 230x120x1x3 -r3d 3 -sl3d 0
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
87 -text "Toolbox for GIMP",12%,75%,24,1,255
89 # Force the last image to be in RGB format.
90 to_rgb :
91 --dimensions[-1] --[-1] 1
92 -if @{-1,3} --[-1] 1 -if @{-1,3} --[-1] 1 -if @{-1,3} -channels[-2] 0,2 -endif
93 -else -channels[-2] 0 -r[-2] 100%x100%x1x3 -endif -else -r[-2] 100%x100%x1x3
94 -endif -rm[-1]
96 #@gimp Tiles
97 #@-----------
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 !]")
100 gimp_regular_tile0 :
101 (100) ($1,$2) -stats[-1] -/[-2] @{-1,1} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -array $1,$2
102 gimp_regular_tile1 :
103 (100) ($1,$2) -stats[-1] -/[-2] @{-1,0} -rm[-1] -r[-2] @-1%,@-1%,1,100%,2 -rm[-1] -array $1,$2
104 gimp_regular_tile2 :
105 -array $1,$2
106 gimp_regular_tile :
107 -gimp_regular_tile$3 $1,$2
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)
110 gimp_array_tile :
111 --translate[-1] 50%x50%x1x1,2 -mv[-1] -2 -fade_diamond $3,$4 -array $1,$2
112 gimp_fade_tile0 :
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
114 gimp_fade_tile1 :
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
116 gimp_fade_tile2 :
117 -gimp_array_tile $1,$2,$3,$4
118 gimp_fade_tile_preview :
119 -gimp_fade_tile0 $1,$2,$4,$5
120 gimp_fade_tile :
121 -gimp_fade_tile$3 $1,$2,$4,$5
123 #@gimp Mirror tiles : gimp_mirror_tile, gimp_mirror_tile0, Number of iterations = int(2,2,10), Expand size = bool(0)
124 gimp_mirror_tile0 :
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
126 gimp_mirror_tile1 :
127 -mirror_tile $1
128 gimp_mirror_tile :
129 -gimp_mirror_tile$2 $1
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)
132 gimp_image_grid :
133 --dimensions (@{-1,0}) (@{-2,1}) -/[-2] $1 -/[-1] $2 -round[-2,-1] 1 -rm[-3] -reverse
134 -grid @-2,@-3 -rm[-3--2]
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)
137 gimp_tile_rotation :
138 --dimensions -mv[-1] -2 -split_tile $1,$2 -rotate[1--1] $3 -append_tile $1,$2 -r[-1] @-2,2 -rm[-2]
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 !]")
141 _gimp_psychetiles :
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
143 gimp_psychetiles0 :
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
145 gimp_psychetiles1 :
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
147 gimp_psychetiles2 :
148 -_gimp_psychetiles $1,$2,$3
149 gimp_psychetiles :
150 -gimp_psychetiles$4 $1,$2,$3
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)
153 gimp_tile_normalize :
154 --dimensions -mv[-1] 0 --channels[-1] 0,2 -channels[-2] 3
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]
157 #@gimp Taquin puzzle : taquin, taquin, Number of X-subdivisions = int(7,1,20), Number of Y-subdivisions = int(7,1,20)
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)
160 gimp_randomtiles :
161 -split_tile $1,$2 ($1) -*[-1] $2
162 -repeat $3 -repeat $4 (@?) -*[-1] @-2 -round[-1] 1 -i[-3] [@-1] -rm[-1] -done -done
163 --[-1] 1 -rm[0-@-1] -rm[-1] -append_tile $3,$4
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)
166 gimp_tile2layers :
167 -split_tile $1,$2
169 gimp_tile2layers_preview :
170 -split_tile $1,$2 -k[50%]
172 #@gimp _Frames
173 #--------------
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)
176 gimp_color_frame :
177 --dimensions -mv[-1] 0
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
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
180 -if $7 -r[-1] @-2,2 -endif -rm[0]
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)
183 gimp_frame_fuzzy :
184 100%x100%x1x1
185 -polygon[-1] 4,0,0,100%,0,100%,$2%,0,$2%,1,1
186 -polygon[-1] 4,0,0,$1%,0,$1%,100%,0,100%,1,1
187 --mirror[-1] x -mirror[-1] y -or[-2,-1]
188 -spread $3 -blur[-1] $4 -threshold[-1] 50% -blur[-1] $5 -n[-1] 0,1
189 -r[-1] [-2],1
190 --*[-1] -1 -+[-1] 1 -*[-3,-1]
191 ($6^$7^$8^$9) -r[-1] 1x1x1x[-2],0 -r[-1] [-2],1 -*[-2,-1]
192 -+[-2,-1]
194 #@gimp _Textures and patterns
195 #----------------------------
197 #@gimp Random puzzle : gimp_puzzle, gimp_puzzle, Scale = float(10,0,100)
198 gimp_puzzle :
199 [-1] -r[-1] $1x$1x100%x100%x2 -noise[-1] 0.1 -r[-1] [-2] -rm[-2]
200 [-1]x2 -translate[-1] 1,1 --[-2,-1] -norm[-1] -threshold[-1] 0.01 -*[-1] -1
201 -+[-1] 1 -r[-1] [-2] -*[-1,-2] 10%x10%x10%x2 -noise[-1] 5,1
202 -r[-1] [-2],[-2],1,2,5 -warp[-2] [-1],1,1,1 -rm[-1]
204 #@gimp Mosaic pattern : mosaic, mosaic, Density = float(2,0.1,10)
206 #@gimp Whirls texture : whirls, whirls
208 #@gimp Paper texture : paper_texture, paper_texture
210 #@gimp Hearts : gimp_hearts, gimp_hearts, Density = float(10,0,100)
211 gimp_hearts :
212 100%x100%x1 -noise[-1] $1,2 -r[-1] [-2] -n[-1] 0,1 -*[-1,-2] -_heart9x7
213 -mirror[-1] y -dilate[-2] [-1] -rm[-1]
215 #@gimp _Artistic
216 #----------------
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>")
218 gimp_polaroid :
219 -polaroid $1,$2,$3 -rotate $4,1
221 #@gimp Old photograph : old_photo, old_photo
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")
224 gimp_drop_shadow0 :
225 -translate[-3,-2] $1,$1,0,0,1
226 gimp_drop_shadow1 :
227 -translate[-3,-2] -$1,$1,0,0,1
228 gimp_drop_shadow2 :
229 -translate[-3,-2] $1,-$1,0,0,1
230 gimp_drop_shadow3 :
231 -translate[-3,-2] -$1,-$1,0,0,1
232 gimp_drop_shadow :
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
234 -*[-2,-1] -n[-1] 0,255 -+[-2,-1] -rotate $3,1
236 #@gimp Sponge effect : sponge, sponge, Sponge size = int(13,3,21)
238 #@gimp Color ellipses : gimp_color_ellipses, gimp_color_ellipses, Opacity = float(0.07,0.01,0.5)
239 gimp_color_ellipses :
240 -to_rgb -color_ellipses $1
242 #@gimp Edges : gimp_edges, gimp_edges, Edge threshold = float(30,0,150)
243 gimp_edges :
244 -to_rgb -edges $1
246 #@gimp Cartoon : gimp_cartoon, gimp_cartoon, Edge threshold = float(30,0,150), Smoothness = float(1,0,10)
247 gimp_cartoon :
248 -to_rgb [-1]x2 -edges $1 -r[-2] 8x8x1x3,2 -r[-3] 100%x100%x100%x3
249 -rgb2lut[-3] [-2] -lut2rgb[-3] [-2] -rm[-2] -blur[-2] $2 -*[-2--1] -n[-1] 0,255
251 #@gimp Pen drawing : gimp_pen_drawing, gimp_pen_drawing
252 gimp_pen_drawing :
253 -to_rgb -drawing
255 #@gimp Whirl drawing : draw_whirl, draw_whirl
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)
258 gimp_cubism :
259 --dimensions -*[-1] $2 -/[-1] 100 -stats[-1] -round[-1] 1 -mv[-1] 0 -cubism $1,@{-2,1},$3,$4,$5 -rm[0]
261 #@gimp BW stencil : gimp_stencilbw, gimp_stencilbw, Edge threshold = float(30,0,150), Smoothness = float(10,0,30)
262 gimp_stencilbw :
263 -r[-1] 100%x100%x1x100% -t float [-1] -edges $1 -quantize[-2] 3 -blur[-2] $2
264 -sharpen[-2] 1000000 -norm[-2] -n[-2] 0,1 -*[-1,-2] -n[-1] 0,255
266 #@gimp BW pencil : gimp_pencilbw, gimp_pencilbw, Pencil type = float(0.3,0,5), Amplitude = float(60,0,200)
267 gimp_pencilbw :
268 -to_rgb -norm -blur $1 -sharpen 4000 -smooth $2,0,1 -equalize 256
269 -sqrt -n 0,255 -r 100%x100%x1x3
271 #@gimp BW dots : dotsbw, gimp_dotsbw_preview
272 gimp_dotsbw_preview :
273 -r 300%x300%x1x3,3 -dotsbw
275 #@gimp BW dithering : ditheredbw, ditheredbw
277 #@gimp Warhol artwork : warhol, warhol, Number of tiles along X = int(3,1,10), Number of tiles along Y = int(3,1,10)
279 #@gimp Soft glow : glow, glow, Amplitude = float(3,0,10)
281 #@gimp Difference of Gaussians : gimp_dog, gimp_dog, Alpha = float(3,0,10), Beta = float(3.2,0,10)
282 gimp_dog :
283 -dog $1,$2 -n 0,255
285 #@gimp Tetris effect : gimp_tetris, gimp_tetris, Scale = int(10,1,100)
286 gimp_tetris :
287 -to_rgb -tetris $1
289 #@gimp _Deformations
290 #-------------------
292 #@gimp Water : water, water, Amplitude = float(30,0,300), Smoothness = float(1.5,0,4)
294 #@gimp Water reflection : gimp_reflect, gimp_reflect
295 gimp_reflect :
296 -to_rgb -reflect
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)
299 gimp_wave :
300 100%x100% -=[-1] 1,$3%,$4% -distance[-1] 1
301 -*[-1] $2 --sin[-1] -cos[-2] -a[-2,-1] v -*[-1] $1
302 -warp[-2] [-1],1 -rm[-1]
304 #@gimp Random deformation : deform, deform, Amplitude = float(10,0,200)
306 #@gimp Fish-eye : fish_eye, fish_eye, Amplitude = float(250,0,1000)
308 #@gimp _Degradations
309 #--------------------
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")
312 gimp_noise0 :
313 -noise[-1] $1,$2
314 gimp_noise1 :
315 -to_rgb -rgb2ycbcr -s v -noise[-3] $1,$2 -a v -ycbcr2rgb
316 gimp_noise2 :
317 -to_rgb -rgb2ycbcr -s v -noise[-2,-1] $1,$2 -a v -ycbcr2rgb
318 gimp_noise3 :
319 -to_rgb -rgb2ycbcr -s v -noise[-2] $1,$2 -a v -ycbcr2rgb
320 gimp_noise4 :
321 -to_rgb -rgb2ycbcr -s v -noise[-1] $1,$2 -a v -ycbcr2rgb
322 gimp_noise :
323 -gimp_noise$4 $1,$2 -if $3 -n 0,255 -else -cut 0,255 -endif
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)
326 gimp_shade_stripes :
327 -n 0,255
328 -if $2 100% -else 1x100% -endif
329 -noise[-1] $1,2 -distance[-1] 1
330 -r[-1] [-2] -n[-1] $3,$4 -*[-1,-2] -cut[-1] 0,255
332 #@gimp Old-movie stripes : stripesy, stripesy, Frequency = float(10,0,100)
334 #@gimp Damp patch : damp_patch, damp_patch, Opacity = float(0.7,0,1)
336 #@gimp Light patch : light_patch, light_patch, Darkness = float(0.7,0,1), Lightness = float(2.5,1,4)
338 #@gimp _Image enhancement
339 #-------------------------
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>")
342 # RGB version
343 gimp_anisotropic_filter0 :
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
345 # Luminance version
346 gimp_anisotropic_filter1 :
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
348 # Chrominance version
349 gimp_anisotropic_filter2 :
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
351 # Blue chrominance version
352 gimp_anisotropic_filter3 :
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
354 # Red chrominance version
355 gimp_anisotropic_filter4 :
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
357 # Generic version
358 gimp_anisotropic_filter :
359 -gimp_anisotropic_filter$12 $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$13
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>")
362 # RGB version
363 gimp_patch_filter0 :
364 -repeat $5 -denoise $4,$3,$1,$2 -done -cut 0,255
365 # Luminance version
366 gimp_patch_filter1 :
367 -rgb2ycbcr -s v -repeat $5 -denoise[-3] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
368 # Chrominance version
369 gimp_patch_filter2 :
370 -rgb2ycbcr -s v -repeat $5 -denoise[-2,-1] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
371 # Blue chrominance version
372 gimp_patch_filter3 :
373 -rgb2ycbcr -s v -repeat $5 -denoise[-2] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
374 # Red chrominance version
375 gimp_patch_filter4 :
376 -rgb2ycbcr -s v -repeat $5 -denoise[-1] $4,$3,$1,$2 -done -a v -ycbcr2rgb -cut 0,255
377 # Generic version
378 gimp_patch_filter :
379 -gimp_patch_filter$6 $1,$2,$3,$4,$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)
382 gimp_bilateral :
383 -repeat $3 -bilateral $1,$2 -done
385 #@gimp Mean-curvature regularization : gimp_meancurvature_flow, gimp_meancurvature_flow, Number of iterations = int(4,1,10), Time step = float(30,5,50)
386 gimp_meancurvature_flow :
387 -meancurvature_flow $1,$2 -cut 0,255
389 #@gimp TV regularization : gimp_tvflow, gimp_tvflow, Number of iterations = int(4,1,40), Time step = float(30,5,100)
390 gimp_tvflow :
391 -tv_flow $1,$2 -cut 0,255
393 #@gimp Inverse diffusion sharpening : gimp_sharpen0, gimp_sharpen0, Amplitude = float(50,1,300), Number of iterations = int(2,1,10)
394 gimp_sharpen0 :
395 -repeat $2 -sharpen $1,0 -done -cut 0,255
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)
398 gimp_sharpen1 :
399 -repeat $5 -sharpen $1,1,$2,$3,$4 -done -cut 0,255
401 #@gimp Deinterlace : gimp_deinterlace, gimp_deinterlace0, Method = choice("Simple","Motion-compensated")
402 gimp_deinterlace0 :
403 -deinterlace 0
404 gimp_deinterlace :
405 -deinterlace $1
407 #@gimp _Rendering and synthesis
408 #-------------------------------
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)
411 gimp_elevation :
412 -to_rgb --blur $4 -*[-1] $3 -r $1,$2,1,-100,2 -elevation3d[0] [-1] -rm[1] -c3d[-1] -r3d $11 -f3d $13
413 ($5^$6^$7) -r[-1] $1x$2x1x3
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]
416 gimp_elevation_preview :
417 -to_rgb --blur $4 -*[-1] $3 -r 200,200,1,-100,2 -elevation3d[0] [-1] -rm[-1] -c3d[-1] -r3d $11 -f3d $13
418 ($5^$6^$7) -r[-1] 200x200x1x3
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]
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)
422 gimp_elevation_anim :
423 -to_rgb --blur $4 -*[1] $3 -r $1,$2,1,-100,2 -elevation3d[0] [1] -rm[1] -c3d[-1] -r3d $11 -f3d $14
424 -repeat $13
425 ($5^$6^$7) -r[-1] $1x$2x1x3
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]
428 gimp_elevation_anim_preview :
429 -to_rgb --blur $4 -*[1] $3 -r 200,200,1,-100,2 -elevation3d[-2] [-1] -rm[-1] -c3d[-1] -r3d $11 -f3d $14
430 ($5^$6^$7) -r[-1] 200x200x1x3
431 -rot3d[0] 1,0,0,$8 -*3d[0] $10 -object3d[-1] [0],50%,50%,0,$12 -rm[0]
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)
434 _gimp_imagecube3d0 : ($1^$2^$3) -r[-1] [-2],1 -rm[-2]
435 _gimp_imagecube3d1 : -plasma[-1] 10,10 -n[-1] 0,128 -skip $*
436 gimp_imagecube3d :
437 -to_rgb -imagecube3d $2 -*3d $3 -rot3d 0,0,1,$6 -rot3d 0,1,0,$5 -rot3d 1,0,0,$4 $1x$1x1x3
438 -_gimp_imagecube3d$7 $8,$9,$10 -r3d 2 -o3d -object3d[1] [0],50%,50% -k[1]
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)
441 _gimp_random3d0 : -cube3d $1
442 _gimp_random3d1 : ($1) -/[-1] 2 -cone3d @-1,$1 -rm[-2]
443 _gimp_random3d2 : ($1) -/[-1] 2 -cylinder3d @-1,$1 -rm[-2]
444 _gimp_random3d3 : -sphere3d $1,2
445 _gimp_random3d4 : ($1) -/[-1] 3 -torus3d $1,@-1 -rm[-2]
446 gimp_random3d :
447 -to_rgb --dimensions -/[-1] 2 -repeat $2
448 (@{1,0}) -+[-1] @{1,1} -*[-1] $3 -/[-1] 100 -p[-1] -v- -_gimp_random3d$1 @-1 -rm[-2]
449 -rot3d[-1] 1,1,0,@{?,0,360}
450 (@{?,-1,1}) -*[-1] @{1,0} (@{?,-1,1}) -*[-1] @{1,1}
451 -+3d[-3] @-2,@-1,@{?,-$4,$4} -rm[-2,-1]
452 -col3d[-1] @{?,255},@{?,255},@{?,255} -done -+3d[2--1] -r3d $5 -o3d -object3d[0] [-1],50%,50%,0,$6
453 -k[0]
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)
456 gimp_mandelbrot :
457 ($1) --[-1] $3 ($2) --[-1] $4 ($1) -+[-1] $3 ($2) -+[-1] $4 -a[-4--1] x
458 -mandelbrot[-2] @-1,$5,$6,$7,$8 -rm[-1]
459 -if $9 ($9) --[-1] 1 -lut2rgb[-2] @-1 -rm[-1] -else -norm -n 0,255 -endif
461 #@gimp _Selections
462 #------------------
463 #@gimp Global RGB selection : gimp_selectrgb, gimp_selectrgb, Selected color = color(255,255,255), Tolerance = float(100,1,450)
464 gimp_selectrgb :
465 -to_rgb -select_rgb $1,$2,$3,$4 -n 0,255
467 #@gimp _Bulk filters
468 #--------------------
469 #@gimp Fourier transform (centered log-module) : gimp_fourier, gimp_fourier
470 gimp_fourier :
471 -fft -sqr -+ -sqrt -+ 1 -log -translate 50%,50%,0,0,2 -n 0,255
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>")
474 gimp_import_image :
475 -rm $1 -s z -if $2 -n 0,255 -else -cut 0,255 -endif -p
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>")
478 gimp_custom :
479 -nop
481 #@gimp _Additionnal informations
482 #--------------------------------
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>")
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].")
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>")
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.")
491 #@gimp Initial G'MIC filters
492 #----------------------------
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.")
495 # Local Variables:
496 # mode: sh
497 # End:
498 #
499 # (End of G'MIC macro file)