###########################################################################################################
#####################

#@gimp  Weird Fx : gimp_contrast_swm3b , gimp_contrast_swm3b(0)
#@gimp : sep = separator ()
#@gimp : Blur the mask = float(2,0.5,10)
#@gimp : sep = separator ()
#@gimp : note = note ("Contrast Mask need the negative of the mask")
#@gimp : SKIP to use the mask to boost = bool(false)
#@gimp : note = note ("Uncheck for Contrast Mask,Check for Contrast Boost")
#@gimp : sep = separator ()
#@gimp : note = note("Merge the Mask")
#@gimp : Intensity = float (1,0,1)
#@gimp : sep = separator ()
#@gimp : Correct Color Shift = bool(true)
#@gimp : Swap Layer = bool (false)
#@gimp : Correction Intensity = float(1,0,1)
#@gimp : sep = separator(), note = note("<small>Author : <i>PhotoComiX</i>.      Last update : <i>2010/12/26</i>.</small>")
#@gimp : note = link("Filter explained here","http://www.gimpchat.com/viewtopic.php?f=9&t=864")

gimp_contrast_swm3b :
 -repeat @# -l[$>] -split_opacity -l[0]
 --gimp_do_nothing
--luminance[-1] -to_rgb[-1]
  -blur_xy[-1] $1,$1
  -if {$2==0} -negative[-1] -elif {$2==1} -gimp_do_nothing -endif
  -reverse[-1,-2] -gimp_compose_hardlight[-1,-2] $3
  -if  {$4==0 && $5==0} -keep[-1] -elif {$4==1 && 5==0} -reverse[-1,-2]-gimp_compose_value[-1,-2] $6 -elif {$4==0 && $5==1} -gimp_compose_value[-1,-2] $6 -endif
  
 -endl -a c -endl -done

#@gimp Resurrect from Transparency : gimp_resurrect, gimp_resurrect
#@gimp : note = note ("This filter may resurrect what erased to full transparency")

gimp_resurrect :
 -repeat @# -l[$>]
 -split_opacity -keep[-2]
 -endl -done