Guest User

Tom Keil 3D convertion

a guest
Mar 1st, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.89 KB | None | 0 0
  1. #****************************************
  2. #3D Anaglyph
  3. #****************************************
  4.  
  5. #@gimp 3D Conversion : gimp_make3D, gimp_make3D_preview(1)
  6. #@gimp : sep = separator()
  7. #@gimp : note = note("Stereoscopic settings:")
  8. #@gimp : Scene selector = choice("light motive","dark motive","landscape","center foreground","centerbackground","left foreground","right foreground","underwater")
  9. #@gimp : Stereo base = float(50,0,200)
  10. #@gimp : Depth control = float(0,0,100)
  11. #@gimp : Flip left / right = bool(0)
  12. #@gimp : Use indivial depth map = bool(0)
  13. #@gimp : note = note("<small>To use this option your depth map must be placed below your image. Switch input layers to <i><b>Active and below</b></i>.</small>")
  14. #@gimp : sep = separator()
  15. #@gimp : note = note("Image adjustment:")
  16. #@gimp : Black & White = bool (0)
  17. #@gimp : Stereo pair = bool (0)
  18. #@gimp : Gamma compensation = float(1,0,4)
  19. #@gimp : Color boost = float(1,0,4)
  20. #@gimp : Red / cyan compensation = float(0,-255,255)
  21. #@gimp : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical")
  22. #@gimp : sep = separator(), note = note("<small>Author : <i>Tom Keil</i>.      Last update : <i>2011/03/01</i>.</small>")
  23. #@gimp : note = link("Filter explained here","http://www.flickr.com/groups/gmic/discuss/72157626154386744/")
  24.  
  25. gimp_make3D :
  26.  
  27.  -repeat @# -l[$>] -if {$6==0} -to_rgb[0] --gimp_do_nothing[0]
  28.  -else -luminance[0] -to_rgb[0] --gimp_do_nothing[0] -endif
  29.  -if {$5==0}
  30.  -if {$1==0} --luminance[-1]
  31.  -gimp_channel_processing[-1] 1,{$3/25},0,0,0,0,100,256,0,0,0,2,0,0
  32.  -elif {$1==1} --luminance[-1] -negative[-1]
  33.  -gimp_channel_processing[-1] 1,{$3/25},0,0,0,0,100,256,0,0,0,2,0,0
  34.  -elif {$1==2}
  35.  --gimp_linear_gradient[-1] 0,0,0,255,255,255,255,255,0,90,0,{100-$3}
  36.  -elif {$1==3}  
  37.  --gimp_radial_gradient[-1] 0,0,0,255,255,255,255,255,1,$3,100,50,50
  38.  -elif {$1==4}
  39.  --gimp_radial_gradient[-1] 0,0,0,255,255,255,255,255,0,0,{100-$3},50,50
  40.  -elif {$1==5}
  41.  --gimp_linear_gradient[-1] 0,0,0,255,255,255,255,255,1,0,$3,100
  42.  -elif {$1==6}
  43.  --gimp_linear_gradient[-1] 0,0,0,255,255,255,255,255,0,0,0,{100-$3}
  44.  -elif {$1==7} --channels[-1] 0
  45.  -gimp_channel_processing[-1] 1,{$3/25},0,0,0,0,100,256,0,0,0,2,0,0
  46.  -endif
  47.  -gimp_gaussian_blur[-1] 0,0,{{w+h}*0.00285},1,0,0,0
  48.  
  49.  -else -rv[1,-1] -to_rgb[-1] -luminance[-1] -endif
  50.  
  51.  -r[-1] 100%,100%,1,2 -s[-1] c -f[-1] 0 -n[-2] 0,$2 -a[-1,-2] c
  52.  -warp[-2] [-1],1 -rm[-1]
  53.  -if {$7==0} -s c
  54.  -if {$4==0} -rm[-1,-2,-6]  -mv[-1] 0 -a[-1,-2,-3] c
  55.  -else -rm[-3,-4,-5] -a[-1,-2,-3] c -endif
  56.  -else -if {$4==1} -rv[-1,-2] -endif
  57.  -r[-1,-2] 50%,50% -a[-1,-2] x -endif  
  58.  -apply_gamma $8
  59.  -gimp_mix_lab 1,0,0,$9,0,0,$8,0,0,0,2,0
  60.  -if {$7==0} -gimp_mix_rgb 1,$10,0,1,0,0,1,0,0,0,2,0 -endif -endl -done
  61.  
  62. gimp_make3D_preview :
  63.  -gimp_split_preview "-gimp_make3D ${1--2}",$-1
  64.  
  65.  
  66. #************END OF FILTER***************
Add Comment
Please, Sign In to add comment