Can someone help me figure out what’s happening? Thanks.
Code
#@gui WaterGmicB : watergmicB, watergmic_previewB(0)
#@gui : note = note("<small>Author: <i><a href="http://prawnsushi.free.fr">Prawnsushi</i></a>. Latest Update: <i>2023/14/03</i>.</small>")
#@gui : sep = separator()
#@gui : Write settings on picture = bool(0)
#@gui : note = note("<small>Use original input image resolution or choose processing resolution.\nHigher Res is slower and not always better. </small>")
#@gui : Original Resolution = bool(1)
#@gui : Processing Resolution = int(1000,500,5000)
#@gui : Garagecoder's DCCI2x rescale (Post) = int(0,0,5)
#@gui : sep = separator()
#@gui : note = note("<small>Will revert to None after application so settings can be modified. </small>")
#@gui : - Presets = choice(0,"None","1 - Soft","2 - Cracked","3 - Black","4 - Faded Black")
#@gui : sep = separator()
#@gui : Pre-Process = bool(1)
#@gui : - Sharpening = int(0,0,500)
#@gui : - Blur = float(0,0,10)
#@gui : - Local normalization = float(0.5,0.3,3)
#@gui : Sloppiness = bool(1)
#@gui : - Distort = float(3,0,20)
#@gui : - Blur = float(3,0,50)
#@gui : - Blend Mode = choice(13,"add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation","screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor")
#@gui : - Strength = float(0.5,0.0,1.0)
#@gui : sep = separator()
#@gui : Watering = bool(1)
#@gui : - Smoothing = int(12,0,40)
#@gui : - Iterations = int(1,0,10)
#@gui : Fuzzy Frame Size = int(30,0,350)
#@gui : - Frame Blur = int(20,0,150)
#@gui : - Frame Strentgh = float(0.5,0,5)
#@gui : Plasma Seed = int(-1,-1,9999999)
#@gui : - Plasma Saturation = int(-100,-100,100)
#@gui : - Blend Mode = choice(23,"add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation",screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor")
#@gui : - Plasma Strength = float(0.3,0,1)
#@gui : sep = separator()
#@gui : Cracks = bool(1)
#@gui : Sharpening = int(150,0,500)
#@gui : - Shock Filter = int(1,0,1)
#@gui : Light Relief (0 means all off) = float(0.15,0,1)
#@gui : - Light2 = float(0.02,0,1)
#@gui : - Light3 = float(0.02,0,1)
#@gui : sep = separator()
#@gui : Sketch = bool(1)
#@gui : - Likeness = int(25,0,30)
#@gui : - Threshold Min = int(0,0,255)
#@gui : - Threshold Max = int(20,0,255)
#@gui : - Sketch strength = float(1,0,1)
#@gui : --- Messy lines = float(0.9,0,1)
#@gui : - Blend Mode = choice(22,"add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation",screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor")
#@gui : note = note("<small>Setting Sktech Strength to 0 disables Messy lines too.\n Messy lines uses 'Breaks' by David Tschumperlé.</small>")
#@gui : Noise = float(3,0,6)
#@gui : Canvas = float(0.3,0,1)
#@gui : sep = separator()
#@gui : Post-Process = bool(1)
#@gui : Mix Original Hue/Sat = float(0.5,0,1)
#@gui : Brightness = float(0,-100,100)
#@gui : Contrast = float(0,-100,100)
#@gui : Gamma = float(0,-100,100)
#@gui : Hue = float(0,-100,100)
#@gui : Saturation = float(0,-100,100)
#@gui : sep = separator()
watergmicB :
com,__origres,__procres,dccires,preset,__bst,__bstsharp,__bstblur,__locnorm,__filt,__dist,__distblur,__distmerge,__diststr,__wc,__bilsize,__bilrep,__fuzz,__fuzzblur,__fuzstr,__plsmseed,__plsmsat,__plasmerge,__plastr,__cracks,__sckrad,__sck,__lgtone,__lgttwo,__lgthree,__sketch,__sklike,__cutmin,__cutmax,__linestr,__brkstr,__skmerge,__noistr,cnvs,__post,__huestr,__bri,__con,__gam,__hue,__sat=$*
if $preset==1
com,__origres,__procres,dccires,preset,__bst,__bstsharp,__bstblur,__locnorm,__filt,__dist,__distblur,__distmerge,__diststr,__wc,__bilsize,__bilrep,__fuzz,__fuzzblur,__fuzstr,__plsmseed,__plsmsat,__plasmerge,__plastr,__cracks,__sckrad,__sck,__lgtone,__lgttwo,__lgthree,__sketch,__sklike,__cutmin,__cutmax,__linestr,__brkstr,__skmerge,__noistr,cnvs,__post,__huestr,__bri,__con,__gam,__hue,__sat=\
0,1,1000,0,1,1,0,0,3,1,20,10,10,0.5,1,12,2,127,42,0.365,-1,2,11,0.282,1,1,1,0.01,0.02,0.02,1,29,0,70,0.455,1,20,4,0.2,1,1,0,0,9,0,-7.2
elif $preset==2 com,__origres,__procres,dccires,preset,__bst,__bstsharp,__bstblur,__locnorm,__filt,__dist,__distblur,__distmerge,__diststr,__wc,__bilsize,__bilrep,__fuzz,__fuzzblur,__fuzstr,__plsmseed,__plsmsat,__plasmerge,__plastr,__cracks,__sckrad,__sck,__lgtone,__lgttwo,__lgthree,__sketch,__sklike,__cutmin,__cutmax,__linestr,__brkstr,__skmerge,__noistr,cnvs,__post,__huestr,__bri,__con,__gam,__hue,__sat=\
0,1,1000,0,2,0,0,0,0.3,1,3,3,13,0.5,1,12,1,0,20,0.5,-1,-100,37,0.755,1,500,1,0.027,0.02,0.02,1,25,0,220,1,0.9,22,6,0.3,1,1,0,0,31,0,0
elif $preset==3 com,__origres,__procres,dccires,preset,__bst,__bstsharp,__bstblur,__locnorm,__filt,__dist,__distblur,__distmerge,__diststr,__wc,__bilsize,__bilrep,__fuzz,__fuzzblur,__fuzstr,__plsmseed,__plsmsat,__plasmerge,__plastr,__cracks,__sckrad,__sck,__lgtone,__lgttwo,__lgthree,__sketch,__sklike,__cutmin,__cutmax,__linestr,__brkstr,__skmerge,__noistr,cnvs,__post,__huestr,__bri,__con,__gam,__hue,__sat=\
0,1,1000,0,3,1,0,0,2.3736,1,3,3,13,0.5,1,23,2,30,20,0.5,-1,-100,23,0.5,1,0,1,0.01,0.02,0.02,1,28,0,20,1,0.9,22,6,0,1,0,0,0,0,0,-100
elif $preset==4
com,__origres,__procres,dccires,preset,__bst,__bstsharp,__bstblur,__locnorm,__filt,__dist,__distblur,__distmerge,__diststr,__wc,__bilsize,__bilrep,__fuzz,__fuzzblur,__fuzstr,__plsmseed,__plsmsat,__plasmerge,__plastr,__cracks,__sckrad,__sck,__lgtone,__lgttwo,__lgthree,__sketch,__sklike,__cutmin,__cutmax,__linestr,__brkstr,__skmerge,__noistr,cnvs,__post,__huestr,__bri,__con,__gam,__hue,__sat=\
0,1,1000,0,4,1,308,0,2.3736,1,3,3,0,0.5,1,23,2,350,1,0.5,-1,100,10,1,1,0,1,0.2,0.02,0.02,1,29,0,9,0.9,1,22,6,0.12,1,0,0,0,13.4,0,-100
fi
preset=0
m "BlendMode : $""=__mode" BlendMode "add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation","screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor","error"
m "BlendModeP : $""=__modep" BlendModeP "add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation","screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor","error"
m "BlendModeL : $""=__model" BlendModeL "add","and","average","blue","burn","darken","difference","divide","dodge","exclusion","grainextract","grainmerge","green","hardlight","hardmix","hue","interpolation","lighten","lightness","linearburn","linearlight","luminance","multiply","negation","or","overlay","pinlight","red","reflect","saturation","screen","shapeaverage","softburn","softdodge","softlight","stamp","subtract","value","vividlight","xor","error"
#~ to_rgb
normalize 0,255
nm[0] ORIG
__ORIGW={0,w}
__ORIGH={0,h}
if !$__origres
__res=$__procres,$__procres
rr2d[ORIG] $__res,0,6
fi
if $__bst
blur $__bstblur sharpen $__bstsharp normalize_local $__locnorm,$__locnorm
fi
[ORIG] nm. REND
if $__filt
[ORIG] nm. FILT
local[FILT]
apc "deform $__dist blur $__distblur"
done
blend[REND,FILT] ${__mode{$__distmerge+1}},$__diststr
n[REND] 0,255
fi
if $__wc
if $__plastr>0
[ORIG] nm. PLAS
local[PLAS]
if $__plsmseed>-1
srand $__plsmseed
fi
plasma 1,2,5
adjust_colors 0,0,0,0,$__plsmsat
done
blend[REND,PLAS] ${__modep{$__plasmerge+1}},$__plastr
fi
fi
if $__wc
if $__fuzz>0
[ORIG] nm. FUZZ
local[FUZZ]
fill_color 0,0,0
spread {$__fuzz/2},{$__fuzz/2},0
negate
frame_fuzzy $__fuzz
blur $__fuzzblur,0
deform $__fuzz
spread {$__fuzz/2},{$__fuzz/2}
spread 10
split c rm. . negate. append c
if $__fuzstr!=1
mul $__fuzstr
fi
done
blend_median[REND,FUZZ]
channels 0,2
normalize[REND] 0,255
fi
fi
local[REND]
if $__cracks
if $__sckrad>0
deform 1.5 sharpen $__sckrad,$__sck dilate_circ 1.5 sharpen $__sckrad,$__sck
fi
if $__lgtone>0
repeat 3
fx_light_relief $__lgtone,$__lgttwo,$__lgthree,0,0.2,50,50,20,0.084,0,0 blur 2 erode_circ 3 sharpen $__sckrad
done
fi
fi
if $__wc
repeat $__bilrep
deform 0.3 sharpen 80,0,10,10 bilateral $__bilsize,$__bilsize,$__bilsize,$__bilsize
done
sharpen 80,0,10,10 sharpen 50 normalize 0,255
fi
done
if $__post
if $__huestr>0
[ORIG] nm. HUE
[ORIG] nm. SAT
move[ORIG] -1
blend[HUE,REND] hue,$__huestr
blend[SAT,REND] saturation,{$__huestr/3}
fi
fi
if $__sketch
if $__linestr>0
[ORIG] nm. LINE
local[LINE]
deform 1.5 rolling_guidance {31-$__sklike},10,0.5
gradient_norm negate
if $__brkstr>0
+fx_breaks. 0,5,30,0,3
blend[-1,-2,LINE] multiply,$__brkstr
fi
normalize. $__cutmin,$__cutmax
sharpen. 100
spread. 0.7
done
blend[LINE,REND] ${__model{$__skmerge+1}},$__linestr
fi
fi
normalize[REND] 0,255
keep[REND]
if $__post
adjust_colors[REND] $__bri,$__con,$__gam,$__hue,$__sat
fi
if $dccires>0
repeat $dccires
fx_scale_dcci2x[REND] 1.15,5,1
done
fi
if $__sketch
if $__noistr>0 fx_noise $__noistr,0,11,1,0,50,50 fi
# canvas effect
if $cnvs>0
+fc 255,255,255
noise. 1000,2 to_gray.
. .
parallel " repeat 20 blur_x. 10 sharpen. 5 spread. 0.7 deform. 0.5 done ","
repeat 20 blur_y.. 10 sharpen.. 5 spread.. 0.7 deform.. 0.5 done "
*. ..
keep[0,-1]
n. 0,255
+gradient. xy,1 -a[-2,-1] c
*. {$cnvs/100}
warp[REND] [-1],3,1,1,1
fi
fi
keep[REND]
if $com
RENDW={0,w}
RENDH={0,h}
expand_y 35,0
shift 0,35
text "${1-45}",10,30,12,1,255
text ${__mode{$__distmerge+1}}" "${__modep{$__plasmerge+1}}" "${__model{$__skmerge+1}},10,50,20,1,255
fi
u "{"$com"}""{"$__origres"}""{"$__procres"}{"$dccires"}""{"0"}""{"$__bst"}""{"$__bstsharp"}""{"$__bstblur"}""{"$__locnorm"}""{"$__filt"}""{"$__dist"}""{"$__distblur"}"\
"{"$__distmerge"}""{"$__diststr"}""{"$__wc"}""{"$__bilsize"}""{"$__bilrep"}""{"$__fuzz"}""{"$__fuzzblur"}""{"$__fuzstr"}""{"$__plsmseed"}""{"$__plsmsat"}""{"$__plasmerge"}"\
"{"$__plastr"}""{"$__cracks"}""{"$__sckrad"}""{"$__sck"}""{"$__lgtone"}""{"$__lgttwo"}""{"$__lgthree"}""{"$__sketch"}""{"$__sklike"}""{"$__cutmin"}""{"$__cutmax"}""{"$__linestr"}"\
"{"$__brkstr"}""{"$__skmerge"}""{"$__noistr"}""{"$cnvs"}""{"$__post"}""{"$__huestr"}""{"$__bri"}""{"$__con"}""{"$__gam"}""{"$__hue"}""{"$__sat"}"
watergmic_previewB :
gui_split_preview "watergmicB $*"