daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Dec 29th, 2018 6 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #@gui Pseudo-ECB (Electronic Code Book Algorithm): pseudo_ecb, _pseudo_ecb_preview(0)
  2. #@gui : note = note("This filter is inspired by one of the glitch plugin for Paint.NET This doesn't actually emulate how the codebook encryption algorithm actually work, but it is inspired from it.  This filter uses bomb blending mode which involves RGBA Transfer Function Mesh. See Mesh Blend filter for a link. \n\n <u>Note that the filter works best on images with large patches of single colors.</u> ")
  3. #@gui : sep = separator()
  4. #@gui : note = note("<b>ECB Pattern Key Generator</b>")
  5. #@gui : 1. Double Gradient = bool(0)
  6. #@gui : 2. Length of Gradient#1 = float(3,0,32)
  7. #@gui : 3. ECB Angle#1 = float(135,0,360)
  8. #@gui : 4. ECB Inversion#1 = bool(0)
  9. #@gui : 5. Length of Gradient#2 = float(3,0,32)
  10. #@gui : 6. ECB Angle#2 = float(135,0,360)
  11. #@gui : 7. ECB Inversion#2 = bool(0)
  12. #@gui : 8. Gradient Blend = choice(41,"add","alpha","and","average","blue","burn","darken",
  13. #@gui : "difference","divide","dodge","exclusion","freeze",
  14. #@gui : "grainextract","grainmerge","green","hardlight","hardmix",
  15. #@gui : "hue","interpolation","lighten","lightness","linearburn",
  16. #@gui : "linearlight","luminance","multiply","negation","or",
  17. #@gui : "overlay","pinlight","red","reflect","saturation","screen",
  18. #@gui : "shapeaverage","softburn","softdodge","softlight","stamp",
  19. #@gui : "subtract","value","vividlight","xor")
  20. #@gui : 9. Gradient Blend Opacity = float(1,0,1)
  21. #@gui : sep = separator()
  22. #@gui : note = note("<b>Sharpen Filtering</b>")
  23. #@gui : 10. Sharpening Noise Processing = float(15,0,200)
  24. #@gui : sep = separator()
  25. #@gui : note = note("<b>ECB Image Processing</b>")
  26. #@gui : 11. Transfer Mesh Size for Image (Squared) = int(256,2,256)
  27. #@gui : 12. Image Mesh Contrast = float(100,0,100)
  28. #@gui : 13. Transfer Mesh Size for Gradient (Squared) = int(16,2,256)
  29. #@gui : 14. Gradient Mesh Contrast = float(100,0,100)
  30. #@gui : 15. Double Encryption Effect = bool(0)
  31. #@gui : 16. Inner Blend = choice(41,"add","alpha","and","average","blue","burn","darken",
  32. #@gui : "difference","divide","dodge","exclusion","freeze",
  33. #@gui : "grainextract","grainmerge","green","hardlight","hardmix",
  34. #@gui : "hue","interpolation","lighten","lightness","linearburn",
  35. #@gui : "linearlight","luminance","multiply","negation","or",
  36. #@gui : "overlay","pinlight","red","reflect","saturation","screen",
  37. #@gui : "shapeaverage","softburn","softdodge","softlight","stamp",
  38. #@gui : "subtract","value","vividlight","xor")
  39. #@gui : 17. Inner Blend Opacity = float(1,0,1)
  40. #@gui : 18. Outer Blend = choice(41,"add","alpha","and","average","blue","burn","darken",
  41. #@gui : "difference","divide","dodge","exclusion","freeze",
  42. #@gui : "grainextract","grainmerge","green","hardlight","hardmix",
  43. #@gui : "hue","interpolation","lighten","lightness","linearburn",
  44. #@gui : "linearlight","luminance","multiply","negation","or",
  45. #@gui : "overlay","pinlight","red","reflect","saturation","screen",
  46. #@gui : "shapeaverage","softburn","softdodge","softlight","stamp",
  47. #@gui : "subtract","value","vividlight","xor")
  48. #@gui : 19. Outer Blend Opacity = float(1,0,1)
  49. #@gui : 20. Self-Blend = choice(18,"add","alpha","and","average","blue","burn","darken",
  50. #@gui : "difference","divide","dodge","exclusion","freeze",
  51. #@gui : "grainextract","grainmerge","green","hardlight","hardmix",
  52. #@gui : "hue","interpolation","lighten","lightness","linearburn",
  53. #@gui : "linearlight","luminance","multiply","negation","or",
  54. #@gui : "overlay","pinlight","red","reflect","saturation","screen",
  55. #@gui : "shapeaverage","softburn","softdodge","softlight","stamp",
  56. #@gui : "subtract","value","vividlight","xor")
  57. #@gui : 21. Self-Blend Opacity = float(1,0,1)
  58. #@gui : 22. Pseudocolouring = bool(1)
  59. #@gui : 23. Equalise Copy Before Self-Blend = bool(1)
  60. #@gui : sep = separator(), 24-26. 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)
  61. #@gui : sep = separator(), note = note("<small>Author : <i>Reptorian</i>      Latest update: <i>2018/12/28</i>.</small>")
  62.  
  63. _pseudo_c : v - if {s!=1} to_gray. fi {max(1,iM)},1,1,3,u(255) round. map.. . rm.  v +
  64.  
  65. pseudo_ecb:
  66. repeat $! l[$>]
  67. repeat {$15+1}
  68. pseudo_ecb_generate ${1-14},${16-23}
  69. done
  70. endl done
  71.  
  72. ecb_gradient_base:
  73. f "ang=pi*$2/180;G=x*cos(ang)+y*sin(ang);G%($1)" n 0,255
  74. if {$3==1} mul -1 abs fi
  75.  
  76. pseudo_ecb_generate:
  77. -m "MergeChoice : $""=_mode" -MergeChoice "add","alpha","and","average","blue","burn","darken","difference","divide","dodge","exclusion","freeze","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","edges","error"
  78. +ac "ecb_gradient_base[0] ${2-4}",rgb
  79. if $20 _pseudo_c[1] fi
  80. local[1]
  81. if {$1==1} +ac "ecb_gradient_base[0] ${5-7}",rgb
  82. if $20 _pseudo_c[1] fi
  83. blend ${_mode{$8+1}},$9 equalize fi
  84. endlocal
  85. local[0]
  86. sharpen $10
  87. if $20 +pseudo_c[0] fi
  88. +fx_blend_bomb[0] 0,1,$11,$11,0,2,$12,0,0,0,1,0
  89. blend ${_mode{$15+1}},$16
  90. endlocal
  91. fx_blend_bomb[1] 0,1,$13,$13,0,2,$14,0,0,0,0,0
  92. if $22 equalize[1] fi
  93. blend ${_mode{$17+1}},$18
  94. display
  95. if $22 +equalize else [0] fi
  96. blend ${_mode{$19+1}},$20
  97.  
  98. _pseudo_ecb_preview :
  99. gui_split_preview "pseudo_ecb $*",${-3--1}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top