Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.95 KB | None | 0 0
  1. #@gmic
  2. #
  3. #  File        : seriously.gmic
  4. #                ( G'MIC commands file )
  5. #
  6. #  Description : some rubbish
  7. #
  8. #  Copyright   : yeah no
  9. #
  10. #  License     : just don't expect a warranty
  11. #
  12. #@gui _<b>Artistic</b>
  13.  
  14. #@gui UltraWarp+++ : fx_ultrawarpplusplusplus, fx_ultrawarpplusplusplus(1)
  15. #@gui : note = note("Sequence of multiple partially-randomised texture generation and image deformation filters with multi-iteration warping"), sep = separator()
  16. #@gui : 1.  Quick Refresh Button = bool(0)
  17. #@gui : sep = separator()
  18. #@gui : 2.  Plasma Texture = bool(0)
  19. #@gui : 3.  Plasma Scale = float(2.5,0,20)
  20. #@gui : 4.  Plasma Alpha Channel = bool(0)
  21. #@gui : sep = separator()
  22. #@gui : 5.  Blur = float (0,0,30)
  23. #@gui : sep = separator()
  24. #@gui : 6.  Quadtree Pixelisation [no alpha channel] = bool(0)
  25. #@gui : 7.  Quadtree Min Precision = int(4,2,2048)
  26. #@gui : 8.  Quadtree Max Precision = int(256,0,2048)
  27. #@gui : 9.  Quadtree Min Homogeneity = float(0,0,5)
  28. #@gui : 10.  Quadtree Max Homogeneity = float(5,0,5)
  29. #@gui : sep = separator()
  30. #@gui : 11. Noise Type = choice(2,"Gaussian","Uniform","Salt and pepper","Poisson")
  31. #@gui : 12. Minimum Noise = float(0,0,200)
  32. #@gui : 13. Maximum Noise = float(1,0,200)
  33. #@gui : 14. Noise Channel(s) = choice(2,"All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
  34. #@gui : sep = separator(), note = note("<small>Warping</small>")
  35. #@gui : 15. Warp Iterations = int(5,0,30)
  36. #@gui : 16. Warp Intensity = float(2,0,30)
  37. #@gui : 17. Warp Offset = int(10,0,2000)
  38. #@gui : 18. Correlated Channels = choice("Random","Off","On")
  39. #@gui : 19. Warp Channel(s) = choice(2,"Random","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
  40. #@gui : 20. Random Negation = bool(1)
  41. #@gui : 21. Random Negation Channel(s) = choice(2,"Random","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
  42. #@gui : 22. Gamma Offset = float(0.25,0,1)
  43. #@gui : 23. Hue Offset = float(1,0,1)
  44. #@gui : 24. Normalise = bool(1)
  45. #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
  46. #@gui : 25. Minimum Hue = float(0,0,20)
  47. #@gui : 26. Maximum Hue = float(5,0,20)
  48. #@gui : 27. Minimum Saturation = float(0.5,0,20)
  49. #@gui : 28. Maximum Saturation = float(5,0,20)
  50. #@gui : 29. Minimum Value = float(0,0,20)
  51. #@gui : 30. Maximum Value = float(2,0,20)
  52. #@gui : sep = separator(),
  53. #@gui : -3. Normalise = bool(1)
  54. #@gui : -2. Channel(s) = choice("All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
  55. #@gui : -1. Value action = choice("None","Cut","Normalize")
  56.  
  57. ultrawarpplusplusplus:
  58.  
  59. # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
  60.  
  61.   -srand
  62.  
  63.   hue_min={$25}
  64.   hue_max={$26}
  65.   sat_min={$27}
  66.   sat_max={$28}
  67.   val_min={$29}
  68.   val_max={$30}
  69.  
  70.   -if {$2}
  71.  
  72.     -if {$4} ch=0 -else ch=2 -endif
  73.  
  74.     -ac  "rr={round(u*255)}
  75.          gg={round(u*255)}
  76.          bb={round(u*255)}
  77.  
  78.          -fx_plasma 0.5,0,{$3},1,1,{$rr},{$gg},{$bb}
  79.          -if {$4} -to_rgba -else ch=2 -to_rgb -endif",{$ch}
  80.  
  81.   -endif
  82.  
  83.   -fx_gaussian_blur {$5},0,0,1,2,0,0
  84.  
  85.   n_min={$12}
  86.   n_max={$13}
  87.  
  88.   -if {$n_min > $n_max}
  89.     n_min = {$n_min + $n_max}
  90.     n_max = {$n_min - $n_max}
  91.     n_min = {$n_min - $n_max}
  92.   -endif
  93.  
  94.   -if {$6}
  95.  
  96.     p_min={$7}
  97.     p_max={$8}
  98.     h_min={$9}
  99.     h_max={$10}
  100.  
  101.     -if {$p_min > $p_max}
  102.       p_min = {$p_min + $p_max}
  103.       p_max = {$p_min - $p_max}
  104.       p_min = {$p_min - $p_max}
  105.     -endif
  106.  
  107.     -if {$h_min > $h_max}
  108.       h_min = {$h_min + $h_max}
  109.       h_max = {$h_min - $h_max}
  110.       h_min = {$h_min - $h_max}
  111.     -endif
  112.  
  113.     -fx_noise {max(0,round($n_min+(u*($n_max-$n_min))))},{$11},{$14},1,0
  114.     -fx_quadtree 0,{max(2,round($p_min+(u*($p_max-$p_min))))},{max(0,round($h_min+(u*($h_max-$h_min))))},0,3,1.5,1,1,0
  115.     -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
  116.  
  117.   -endif
  118.  
  119.   -fx_noise {max(0,round($n_min+(u*($n_max-$n_min))))},{$11},{$14},1,0
  120.  
  121.   f={$15} # iterations
  122.   i={$16} # warp intensity
  123.   m={$17} # offset magnitude
  124.   s={$22} # gamma
  125.   v={$23} # hue
  126.  
  127.   -repeat {max(0,$f)}
  128.  
  129.     a=(u-0.5)*$i
  130.     b=(u-0.5)*$i
  131.     c=(u-0.5)*$m*sign($m)
  132.     d=(u-0.5)*$m*sign($m)
  133.     f={round((u*2.98)+0.51)}
  134.     g={round((u*33.98)-0.49)}
  135.     h={(u-0.5)*$s*200}
  136.     o={(u-0.5)*$v*200}
  137.  
  138.     -if {$18==1}
  139.       e=0
  140.     -elif {$18==2}
  141.       e=1
  142.     -else
  143.       e={round(u)}
  144.     -endif
  145.  
  146.     -if {$18==0}
  147.       -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
  148.     -else
  149.       -ac  "a={(u-0.5)*$16}
  150.            b={(u-0.5)*$16}
  151.            c={(u-0.5)*$17*sign($17)}
  152.            d={(u-0.5)*$17*sign($17)}
  153.            f={round((u*2.98)+0.51)}
  154.  
  155.            -if {$18==1}
  156.              e=0
  157.            -elif {$18==2}
  158.              e=1
  159.            -else
  160.              e={round(u)}
  161.            -endif
  162.  
  163.         -_fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f}",{$19},0
  164.          -srand
  165.     -endif
  166.  
  167.  
  168.     -if {$20}
  169.       nn={round(u)}
  170.       -if {$nn}
  171.         -if {$21==0}
  172.           nch={round((u*33.98)-0.49)}
  173.           -ac "-negate",{$nch}
  174.         -else
  175.           -ac "-negate",{$21}
  176.         -endif
  177.       -endif
  178.     -endif
  179.  
  180.     -fx_adjust_colors 0,0,{$h},{$o},0,0
  181.  
  182.     -if {$24}
  183.       -ac "-n 0,255",3
  184.     -endif
  185.  
  186.     hh=((u-0.5)*360)
  187.     ss=((u-0.5)*2)
  188.     vv=((u-0.5)*2)
  189.  
  190.   -done
  191.  
  192.   -repeat {1}
  193.  
  194.     j={min($hue_min,$hue_max)+(u*(max($hue_min,$hue_max)-min($hue_min,$hue_max)))}
  195.     k={min($sat_min,$sat_max)+(u*(max($sat_min,$sat_max)-min($sat_min,$sat_max)))}
  196.     l={min($val_min,$val_max)+(u*(max($val_min,$val_max)-min($val_min,$val_max)))}
  197.    
  198.     hh=((u-0.5)*360)
  199.     ss=((u-0.5)*2)
  200.     vv=((u-0.5)*2)
  201.  
  202.     -fx_mix_hsv {$j},{$hh},0,{$k},{$ss},0,{$l},{$vv},0,0,2,0
  203.  
  204.   -done
  205.  
  206.   -if {$-3}
  207.     -ac "-n 0,255",3
  208.   -endif
  209.  
  210. fx_ultrawarpplusplusplus:
  211.  
  212.   -srand
  213.   -ac "-ultrawarpplusplusplus $*",$-2,$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement