#@gui _ #@gui Vibrato: fx_vibrato, _fx_vibrato_preview(0) #@gui : note = note("This is the advanced version of the Vibrato filter. If you do want to manipulate multiple channels at once, use Vibrato - Basic filter. Note: Disable channel mulplication for non-transparent images. \n\n") #@gui : note = note("This filter is the one of the G'MIC version of MadJik's Paint.NET plugin") #@gui : sep = separator() #@gui : 1. Colour Space = choice("RGB", "CMY", "HSI", "HSL", "HSV", "LAB", "LCH", "YCbCr", "YCbCr-Glic", "YUV", "YIQ", "XYZ", "Bayer") #@gui : sep = separator() #@gui : 2. Manipulate multiple channels at once? = bool(1) #@gui : 3. Process Channel 1? = bool(1) #@gui : 4. Process Channel 2? = bool(1) #@gui : 5. Process Channel 3? = bool(1) #@gui : 6. Process Alpha Channel? = bool(1) #@gui : 7. Inherit Alpha? = bool(1) #@gui : 8. X-Orientation = bool(1) #@gui : 9. Y-Orientation = bool(1) #@gui : 10. U- Factor = float(.85,.1,15) #@gui : 11. V- Factor = float(.85,.1,15) #@gui : 12. X-Scale Factor = float(1,.1,15) #@gui : 13. Y-Scale Factor = float(1,.1,15) #@gui : 14. XY-Scale Factor = float(1,.1,3) #@gui : 15. Percentage-Based X Pixel Shift = float(0,-200,200) #@gui : 16. Percentage-Based Y Pixel Shift = float(0,-200,200) #@gui : 17. Elevation = float(.7,-100,100) #@gui : 18. Multiply Blending = bool(0) #@gui : 19. Invert Vibrato = bool(0) #@gui : 20. Vibrato Blending Factor = float (100,0,100) #@gui : 21. Channel Influence Factor = float(1,-8,8) #@gui : 22. Final Channel Modulos Multiplication Factor = float(1,1,32) #@gui : sep = separator() #@gui : note = note("- Channel #1 - ") #@gui : 23. Process Channel? = bool(1) #@gui : 24. X-Orientation = bool(1) #@gui : 25. Y-Orientation = bool(1) #@gui : 26. U- Factor = float(.85,.1,15) #@gui : 27. V- Factor = float(.85,.1,15) #@gui : 28. X-Scale Factor = float(1,.1,15) #@gui : 29. Y-Scale Factor = float(1,.1,15) #@gui : 30. XY-Scale Factor = float(1,.1,3) #@gui : 31. Percentage-Based X Pixel Shift = float(0,-200,200) #@gui : 32. Percentage-Based Y Pixel Shift = float(0,-200,200) #@gui : 33. Elevation = float(.7,-100,100) #@gui : 34. Multiply Blending = bool(0) #@gui : 35. Invert Vibrato = bool(0) #@gui : 36. Vibrato Blending Factor = float (100,0,100) #@gui : 37. Channel Influence Factor = float(1,-8,8) #@gui : 38. Final Channel Modulos Multiplication Factor = float(1,1,32) #@gui : sep = separator() #@gui : note = note("- Channel #2 - ") #@gui : 39. Process Channel? = bool(1) #@gui : 40. X-Orientation = bool(1) #@gui : 41. Y-Orientation = bool(1) #@gui : 42. U- Factor = float(.85,.1,15) #@gui : 43. V- Factor = float(.85,.1,15) #@gui : 44. X-Scale Factor = float(1,.1,15) #@gui : 45. Y-Scale Factor = float(1,.1,15) #@gui : 46. XY-Scale Factor = float(1,.1,3) #@gui : 47. Percentage-Based X Pixel Shift = float(0,-200,200) #@gui : 48. Percentage-Based Y Pixel Shift = float(0,-200,200) #@gui : 49. Elevation = float(.7,-100,100) #@gui : 50. Multiply Blending = bool(0) #@gui : 51. Invert Vibrato = bool(0) #@gui : 52. Vibrato Blending Factor = float (100,0,100) #@gui : 53. Channel Influence Factor = float(1,-8,8) #@gui : 54. Final Channel Modulos Multiplication Factor = float(1,1,32) #@gui : sep = separator() #@gui : note = note("- Channel #3 - ") #@gui : 55. Process Channel? = bool(1) #@gui : 56. X-Orientation = bool(1) #@gui : 57. Y-Orientation = bool(1) #@gui : 58. U- Factor = float(.85,.1,15) #@gui : 59. V- Factor = float(.85,.1,15) #@gui : 60. X-Scale Factor = float(1,.1,15) #@gui : 61. Y-Scale Factor = float(1,.1,15) #@gui : 62. XY-Scale Factor = float(1,.1,3) #@gui : 63. Percentage-Based X Pixel Shift = float(0,-200,200) #@gui : 64. Percentage-Based Y Pixel Shift = float(0,-200,200) #@gui : 65. Elevation = float(.7,-100,100) #@gui : 66. Multiply Blending = bool(0) #@gui : 67. Invert Vibrato = bool(0) #@gui : 68. Vibrato Blending Factor = float (100,0,100) #@gui : 69. Channel Influence Factor = float(1,-8,8) #@gui : 70. Final Channel Modulos Multiplication Factor = float(1,1,32) #@gui : sep = separator() #@gui : note = note("- Alpha Channel #1 - ") #@gui : 71. Process Channel? = bool(0) #@gui : 72. X-Orientation = bool(1) #@gui : 73. Y-Orientation = bool(1) #@gui : 74. U- Factor = float(.85,.1,15) #@gui : 75. V- Factor = float(.85,.1,15) #@gui : 76. X-Scale Factor = float(1,.1,15) #@gui : 77. Y-Scale Factor = float(1,.1,15) #@gui : 78. XY-Scale Factor = float(1,.1,3) #@gui : 79. Percentage-Based X Pixel Shift = float(0,-200,200) #@gui : 80. Percentage-Based Y Pixel Shift = float(0,-200,200) #@gui : 81. Elevation = float(.7,-100,100) #@gui : 82. Multiply Blending = bool(1) #@gui : 83. Invert Vibrato = bool(0) #@gui : 84. Vibrato Blending Factor = float (100,0,100) #@gui : 85. Channel Influence Factor = float(1,-8,8) #@gui : 86. Final Channel Modulos Multiplication Factor = float(1,1,32) #@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") #@gui : sep = separator(), note = note("Author : Reptorian Latest update: 2018/12/19.") fx_vibrato: split_opacity local[0] if {$1==1} rgb2cmy elif {$1==2} rgb2hsi8 elif {$1==3} rgb2hsl8 elif {$1==4} rgb2hsv8 elif {$1==5} rgb2lab8 elif {$1==6} rgb2lch8 elif {$1==7} rgb2ycbcr elif {$1==8} rgb2ycbcrglic elif {$1==9} rgb2yuv8 elif {$1==10} rgb2yiq8 elif {$1==11} rgb2xyz8 elif {$1==12} rgb2bayer 0 fi s c if {$2==1} if {$3==1} -vibrato[0] $8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22 fi if {$4==1} -vibrato[1] $8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22 fi if {$5==1} -vibrato[2] $8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22 fi elif {$2==0} if {$23==1} -vibrato[0] $24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38 fi if {$39==1} -vibrato[1] $40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54 fi if {$55==1} -vibrato[2] $56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70 fi fi a c if {$1==1} cmy2rgb elif {$1==2} hsi82rgb elif {$1==3} hsl82rgb elif {$1==4} hsv82rgb elif {$1==5} lab82rgb elif {$1==6} lch82rgb elif {$1==7} ycbcr2rgb elif {$1==8} ycbcrglic2rgb elif {$1==9} yuv82rgb elif {$1==10} yiq82rgb elif {$1==11} xyz82rgb elif {$1==12} bayer2rgb 0,0,0 fi endl local[1] if {$2==1} if {$6==1} -vibrato[0] $8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$7,$19,$20,$21,$22 fi elif {$2==0} if {$71==1} -vibrato[0] $72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86 fi fi endl a c vibrato: repeat $! l[$>] n 0,255 f " q=($8/100)*w; l=($9/100)*h; X=(($1?w-x+q:x+q)/w-.5) * 2 * 1/$5 * 1/$7; Y=(($2?h-y+l:y+l)/h-.5) * 2 * 1/$6 * 1/$7; U=sqrt($3); V=sqrt($4); Z=((X-Y) * (X-U) * (X+U) * (Y-V) * (Y+V))+ $10; C=(Z+((1-i/255)/(($3>1?$3:1/$3)*($4>1?$4:1/$4)))*$14)*(Z+((1-i/255)/(($3>1?$3:1/$3)*($4>1?$4:1/$4)))*$14); F=abs(C)>1?C-int(C):C; A=$12?F:1-F; B=$11?(i*A):A*200; E=$13/100*B+(1-$13/100)*i; " n 0,255 mul $15 mod 256 endl done _fx_vibrato_preview : gui_split_preview "fx_vibrato ${1--2}",$-1