Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gimp Photoillustration: gimp_Photoillustration, gimp_Photoillustration_preview(0)
- #@gimp : note = note("adding an illustrative effect to any photograph")
- #@gimp : sep = separator()
- #@gimp : Local contrast style = choice("tone mapping","local normalisation","unsharp mask","global mapping","dynamic range increase","none")
- #@gimp : Local contrast effect = float(0.25,0.00,2.5)
- #@gimp : Smoothing style = choice("anisotropic","bilateral","color channel smoothing","segmentation","morphological closing","edge preserving","none")
- #@gimp : Contour precision = float(0.30,0.00,1.00)
- #@gimp : Area smoothness = float(0.50,0.00,10.00)
- #@gimp : Sharpening radius = float(0.50,0.00,10.00)
- #@gimp : Sharpening strength = float(1.00,0.00,5.00)
- #@gimp : Special effects = choice("none","soft glow","dusty","Orton glow","extra smooth","bloom","paintstroke")
- #@gimp : Effect strength = float(5.00,0.00,20.00)
- #@gimp : Overall lightness = float(0,-50,50)
- #@gimp : Overall contrast = float(1,0.5,1.5)
- #@gimp : Shadows lightness = float(0,-100,100)
- #@gimp : Highlights lightness = float(0,-100,100)
- #@gimp : Mid tone contrast = float(1,0.5,4)
- #@gimp : Color green-magenta = float(0,-20,20)
- #@gimp : Color blue-yellow = float(0,-20,20)
- #@gimp : Color boost = float(1.2,0,4)
- #@gimp : Detail reconstruction detection = float (98.5,50,100)
- #@gimp : Detail reconstruction smoothness = float(5,0,10)
- #@gimp : Detail reconstruction strength = float(0.5,0,1)
- #@gimp : Detail reconstruction style = choice("micro/macro details adjusted","fine","strong","high pass","artistic round","artistic hard","artistic modern","comic Style","gritty","none")
- #@gimp : Keep detail layer seperate = bool(0)
- #@gimp : Remove artifacts from micro/macro detail = bool(0)
- #@gimp : Skin tone protection = bool(0)
- #@gimp : Sharpen edges only = bool(0)
- #@gimp : sep = separator()
- #@gimp : note = note("WARNING: this filter may run slow on larger images, downsize your image before running the filter if necessary")
- #@gimp : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical")
- #@gimp : sep = separator(), note = note("Author : Tom Keil / Last update : 2011/01/12")
- #@gimp : note = link("Filter explained here","http://www.mediafire.com/?nj2rhyc18ka861p")
- #********************************************************
- #Photoillustration Filter VERSION 4.4 12.01.2011 Tom Keil
- #********************************************************
- gimp_Photoillustration :
- -repeat @# -l[$>]
- -if {$21==0} --gimp_do_nothing --negative[1] #securing details from original
- --gimp_do_nothing[0] --negative[0]
- -gimp_gaussian_blur[2] {{{100-$18}/5}+0.5},0,0,1,0,0,0 #as adjusted micro and macro details
- -gimp_compose_dodge[1,2] 1
- -if {$23==1} -gimp_gaussian_blur[1] {{{100-$18}/10}+0.5},0,0,1,0,0,0 -endif
- -gimp_gaussian_blur[3] {{{{{100-$18}/5}+1}*10}+10},0,0,1,0,0,0
- -gimp_compose_dodge[2,3] 1
- -if {$23==1} -gimp_gaussian_blur[2] {{{{100-$18}/10}+0.5}*3},0,0,1,0,0,0 -endif
- -reverse[1,2] -gimp_compose_multiply[1,2] {1-{$19/10}}
- -gimp_channel_processing[1] {{1-$20}+0.1},1,0,0,0,0,100,256,0,0,0,2,7,0
- -elif {$21==1} --gimp_laplacian $19,{99.99-$18},$18,1,1,0 # securing details of original
- -elif {$21==2} --gimp_gradient_norm $19,0.5,{99.99-$18},$18,1,0 # securing stronger details of original
- -elif {$21==3} --gimp_highpass {-{$18-100.3}},{{10-$19}*0.7},0,1,0 # details as highpass
- -elif {$21==4} --gimp_pencilbw {100-$18},{$19*20},0,0,0 # details as B&W pencil
- -elif {$21==5} --gimp_hardsketchbw 2000,2,$19,0.1,{100-$18},0,0 # details as B&W hard sketch
- -elif {$21==6} --gimp_thin_edges $19,{{$18/5}-10},0,0 # details as thin edges
- -elif {$21==7} --gimp_edges {$19/3.5},{95-$18},0,0 # details as comic style
- --gimp_mix_hsv[0] 1,0,0,1,-1,0,1,0,0,0,2,0
- -gimp_channel_processing[2] 1,1,0,{$19/10},4,{{$18-50}*2},100,256,0,0,0,2,7,0
- -reverse[1,2] -gimp_compose_multiply[1,2] {0.5+{$20/2}}
- -elif {$21==8} --channels 2
- -if {$19<=5} -gimp_unsharp[1] 1,{2-{{$19*0.3}+0.5}},20,{5-$19},0.00,1.00,0.5,1,0,7,0
- -else -gimp_gaussian_blur[1] {$19-5},0,0,1,0,0,0 -endif
- -endif
- -if {$1!=3}
- -gimp_channel_processing[0] 1,1,$12,0,0,0,100,256,0,0,1,{abs($12/10)},7,0 # shadows correction
- -gimp_channel_processing[0] 1,1,$13,0,0,0,100,256,0,0,3,{abs($12/10)},7,0 # highlights correction
- -endif
- -if {$24==0}
- -if {$1==0} -gimp_map_tones[0] {$2/2.5},{1-{$2/2.5}},$2,{2+{$2*80}},3,0 # tone mapping in lightness
- -elif {$1==1} -gimp_normalize_local[0] {$2*2},{1+{$2*25.2}},{$2*16},{$2*16},0,3,0 # local normalisation in luminosity
- -elif {$1==2} -gimp_unsharp[0] 0,{{w+h}/100},0,$2,0,1,1,1,0,7,0 # USM wide radius in lightness
- -elif {$1==3} --negative[0]
- -if {$21!=9} -reverse[1,2] -endif
- -gimp_gaussian_blur[1] {{{w+h}/5}-{$2*{{w+h}/12.5}}},0,0,1,0,0,0
- -to_gray[1] -reverse[0,1] -gimp_compose_softlight[0,1] {$2/2.5} # inverted overlay
- -elif {$1==4} -gimp_dri[0] {$2/2.5},{$2/5},{$2/2.5},{$2*2},{$2/2.5},1,1,0
- -endif # as alternative local contrast enhancement
- -else #skin protection
- --to_rgba[0] --channels[0] 0 -if {$21!=9} -move[1] 4 -endif
- -negative[2]
- -gimp_channel_processing[2] 1,1,2,0,0,0,100,256,0,0,0,2,7,0
- -gimp_gaussian_blur[2] {{w+h}/500},0,0,1,0,0,0
- -to_gray[2]
- -if {$1==0} -gimp_map_tones[1] {$2/2.5},{1-{$2/2.5}},$2,{2+{$2*80}},3,0 # tone mapping in lightness
- -elif {$1==1} -gimp_normalize_local[1] {$2*2},{1+{$2*25.2}},{$2*16},{$2*16},0,3,0 # local normalisation in luminosity
- -elif {$1==2} -gimp_unsharp[1] 0,100,0,$2,0,1,1,1,0,7,0
- -elif {$1==3} -negative[1] -gimp_gaussian_blur[1] {{{w+h}/5}-{$2*{{w+h}/12.5}}},0,0,1,0,0,0
- -to_gray[1] -to_rgba[1]
- -elif {$1==4} -gimp_dri[1] {$2/2.5},{$2/5},{$2/2.5},{$2*2},{$2/2.5},1,1,0 -to_rgba[1]
- -endif
- -split[1] c
- -if {$21!=9} -reverse[4,5] -compose_multiply[4,5] -append[-5,-4,-3,-2] c
- -else -reverse[3,4] -compose_multiply[3,4] -append[-4,-3,-2,-1] c -endif
- -if {$1!=3} -compose_rgba[0,1] -else -reverse[0,1]
- -gimp_compose_softlight[0,1] {$2/2.5} -endif
- -endif #end skin protection
- -gimp_channel_processing[0] 1,$11,$10,0,0,0,100,256,0,0,0,2,7,0 # general lightness and contrast settings
- -gimp_channel_processing[0] 1,$14,0,0,0,0,100,256,0,0,2,{abs($14*2.5)},7,0 # mid tone contrast setting
- -if {$1==3}
- -gimp_channel_processing[0] 1,1,$12,0,0,0,100,256,0,0,1,{abs($12/10)},7,0 # shadows correction
- -gimp_channel_processing[0] 1,1,$13,0,0,0,100,256,0,0,3,{abs($12/10)},7,0 # highlights correction
- -endif
- -if {$3==0} # different smoothing methods
- -gimp_anisotropic_smoothing[0] {$5*100},{$4*2},$4,$5,$5,0.80,30.00,2.0,0,1,1,0,1,0
- -elif {$3==1} -gimp_bilateral[0] {100-{$4*100}},{$5*25},1,0,0
- -elif {$3==2} -gimp_gaussian_blur[0] {$5*10},0,0,1,8,0,0
- -elif {$3==3} -gimp_segment_watershed[0] {$4*5},{$5/2},0,0
- -elif {$3==4} -gimp_morpho[0] 3,{$5*2+2},0,2,0,1,0
- -elif {$3==5} -gimp_edgepreserving_smoothing[0] {$4*2},$4,$5,$5,{{$5*4.5}+5},{{$5*9.9}+1},0,0
- -endif
- -gimp_mix_lab[0] 1,0,0,$17,$15,0,$17,$16,0,0,2,0 # LAB mixer for colour boost effect
- -if {$25==0}
- -gimp_unsharp[0] 1,$6,20,$7,0.00,1.00,0.5,1,0,7,0 # bilateral USM dark emphasized
- -else
- --to_rgba[0] --gimp_edges[0] $6,{30-{$7*5}},1,0 -if {$21!=9} -move[1] 4 -endif
- -gimp_unsharp[1] 1,$6,20,$7,0.00,1.00,0.5,1,0,7,0
- -gimp_gaussian_blur[2] {{w+h}/500},0,0,1,0,0,0
- -to_gray[2]
- -split[1] c
- -if {$21!=9} -reverse[4,5] -compose_multiply[4,5] -append[-5,-4,-3,-2] c
- -else -reverse[3,4] -compose_multiply[3,4] -append[-4,-3,-2,-1] c -endif
- -compose_rgba[0,1]
- -endif
- -if {$22==0}
- -if {$21==3} -reverse -gimp_compose_overlay $20 # detail reconstruction from original
- -elif {$21==8} -reverse -gimp_compose_hardlight $20
- -elif {$21!=9} -reverse -gimp_compose_multiply $20
- -endif -endif
- -if {$8==1}
- -gimp_glow[0] $9,0,0 # soft glow
- -elif {$8==2} --gimp_highpass[0] {$9*3},2,1,0,0 # inverse highpass
- -if {{$22==1}&&{$21!=9}} -reverse[1,2] -endif
- -reverse[0,1] -gimp_compose_overlay[0,1] {$9/40}
- -elif {$8==3} --gimp_do_nothing[0] --gimp_do_nothing[0] # orton effect
- -if {{$22==1}&&{$21!=9}} -reverse[1,3] -endif
- -gimp_compose_screen[1,2] 1 -gimp_gaussian_blur[1] {$9*3},0,0,1,0,0,0
- -reverse[0,1] -gimp_compose_softlight[0,1] {$9/20}
- -elif {$8==4} # additional light smoothing
- -gimp_anisotropic_smoothing[0] 30,1.5,0.3,{$9/4},1.10,0.80,30.00,2.0,0,1,1,0,1,0
- -elif {$8==5}
- --gimp_mix_hsv[0] 1,0,0,1,-1,0,1,0,0,0,2,0 # highlights bloom
- -if {{$22==1}&&{$21!=9}} -reverse[1,2] -endif
- -gimp_channel_processing[1] 1,1,0,0,4,0,{100-{$9*2.5}},256,0,1,0,2,0,0
- -gimp_gaussian_blur[1] $9,0,0,1,0,0,0
- -gimp_channel_processing[1] 1,1,0,0,4,0,{50-{$9*2}},256,0,1,0,2,0,0
- -gimp_replace_color[1] 1,0,0,0,0,255,0,0,0,0
- -gimp_gaussian_blur[1] {$9*2},0,0,1,0,0,0
- -reverse[0,1] -gimp_compose_softlight[0,1] {0.25+{$9/150}}
- -elif {$8==6}
- -gimp_anisotropic_smoothing[0] 60,0.16,{{$9/50}+0.6},{{$9/9}+0.6},2.35,0.8,30,2,0,1,1,0,1
- -endif
- -endl -done
- gimp_Photoillustration_preview :
- -gimp_split_preview "-gimp_Photoillustration ${1--2}",$-1
- #*********** end of filter ************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement