Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. #@gui Gradient norm [JR's mod] : fx_jr_gradient_norm, fx_jr_gradient_norm_preview(1)
  2. #@gui : Smoothness = float(0,0,10)
  3. #@gui : Contrast = float(0.45,0,1.5)
  4. #@gui : Min threshold = float(40,0,100)
  5. #@gui : Max threshold = float(60,0,100)
  6. #@gui : Negative = bool(0)
  7. #@gui : Include direction = bool(0)
  8. #@gui : Scale X = float(1,0,5)
  9. #@gui : Scale Y = float(1,0,5)
  10. #@gui : Interpolation = choice(2,"Nearest","Average","Bilinear","Bicubic")
  11. #@gui : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right","Duplicate horizontal","Duplicate vertical","Checkered","Checkered inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0)
  12. #@gui : sep = separator(), note = note("<small>Author: <i><a href="http://ow.ly/wpsV30fzhdI">David Tschumperl&#233;</a></i>. Latest update: <i>2010/29/12</i>.</small>")
  13.  
  14. jr_dir2rgb :
  15. v - channels 0,1 repeat $! l[$>] nm={0,n}
  16. s c complex2polar round.. 0.001
  17. *. {180/pi} %. 360 100%,100%,1,1,1 mv... $!
  18. c 0,360 if {im!=iM} n. 0,1 else f. 1 fi
  19. a c hsv2rgb
  20. nm $nm endl done v +
  21.  
  22. jr_gradient_norm :
  23. b $1 gradient_norm c 0,255 ^ $2
  24. c $3%,$4%
  25. if $5 negate fi
  26. n 0,255
  27.  
  28. fx_jr_gradient_norm :
  29. repeat $! l[$>]
  30. if {$9==3}
  31. inter=5
  32. else
  33. inter={1+$9}
  34. fi
  35. if {$7!=1||$8!=1}
  36. ww={w}
  37. hh={h}
  38. shift -0.5,-0.5,0,0,1
  39. r {max(1,$7*w)},{max(1,$8*h)},100%,100%,$inter
  40. fi
  41. if $6
  42. +l luminance gradient append c
  43. blur $1 orientation +jr_dir2rgb endl rm[1]
  44. fi
  45. jr_gradient_norm[0] ${1-5}
  46. if {$7!=1||$8!=1}
  47. r $ww,$hh,100%,100%,$inter
  48. fi
  49. if $6 blend multiply fi
  50. endl done
  51. fx_jr_gradient_norm_preview :
  52. gui_split_preview "fx_jr_gradient_norm $*",${-3--1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement