GIMP_SCRIPT_TEMPLATES


=====================GIMP_SETUP==================================


1)Open Gimp


2)Open Script-Fu Console


3)The Console has an input widow


4)Open the “Load_First” file which contains the tranlation code


5)Select and copy all



6)Paste into the Console’s an input window.



7)Hit return in the Console’s an input widow.


=============LOAD_TEMPLATES_BY_CUT_AND_PASTE==========================

The colored text templates below can be cut and paste into the Console’s window.


(define image     (newRGBimage   "width" 300         "height"  300 ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (SelRect       "imag"  image       "x y w h mode" 50 50 100 100 0 )); ADD0,SUB1,REP2,INTE3

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 


==================================================

The code above first creates a 300x300 RGB image.

Then it adds a layer called “backlayer”.

It then selects a 100x100 square at a XY of 50,50.

The foreground gets set to black and background to white.

The select area is bucket filled with the foreground color.

The select area is lastly deselected. 





===============LOAD_SVG_FILES===============================================


(define fname3     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone.svg"  )

(define image      (Load-svg      "path"  fname3      "name"    "Blank.jpg" "resol w h path" 72 0 0 2    ) )

(define backlayer  (NameBackLayer "image" image       "Layname" "backlayer" ) )


================Load_BMP=============================


(define fname     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone.bmp"  )

(define image     (Load-bmp      "path"  fname       "name"    "Blank.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )


================Load_Jpeg=============================


(define fname     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone.jpg" )

(define image     (Load-jpg      "path"  fname       "name"    "Blank.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )



================Load_SVG_2_Vector=============================


(define fname3     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone.svg"  )

(define image      (newRGBimage   "width" 500         "height"  500 ) )

                   (gimp-vectors-import-from-file image fname3 1 0)

(define activVect  (vectorGet     "imag"  image    )  )

(define null       (vectorVis     "path"  activVect  "vis" 1  )  )




==============JPEG_2_BMP===================================================



(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone.jpg" )

(define image     (Load-jpg      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (Gauss         "imag"  image       "Lay"    backlayer    "xRad" 5 "yRad" 5 )   )

                   (plug-in-wavelet-sharpen  1 image backlayer 5 1 1)

                   (plug-in-wavelet-sharpen  1 image backlayer 5 1 1)

(define null      (SelectColor   "layer" backlayer    "color"   '(0 0 0 ) "thresshold" 70 ) )

(define null      (SelectInvert  "image" image                  ))

(define null      (BuckFill      "lay"   backlayer    "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (thresshold    "lay"   backlayer    "minlev maxlev"  130 255   )) 

(define fname     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone2.bmp" )

                  (gimp-image-set-resolution image 72 72)

                  (file-bmp-save 1 image backlayer fname "dogbertphone")



==============BitImage_2_SVG_Vectors===================================================


potrace -s -r 72 -a 1.33  -O 4 /Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone2.bmp



(define fname3     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/dogbertphone2.svg"  )

(define image     (Load-svg      "path"  fname3   "name"    "Tiger.jpg" "resol w h path" 72 0 0 2    ) )

(define backlayer (NameBackLayer "image" image    "Layname" "backlayer" ) )



================Load_HTML5_Created_PNG=============================


;FILE/OPEN    Load PNG File

(define run-mode 1)

(define filename "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/DownloadedFile.png")

(define raw-filename "DownloadedFile.png")

(define image (file-png-load run-mode filename raw-filename))

(gimp-display-new     (car image) )

; Find background file it is in

(define backlayer (gimp-image-get-active-layer (car image)))

(gimp-layer-get-name (car backlayer) )

(gimp-image-get-layers (car image))



===============MARBLE_TEXTURE=============================================

;===========       now                       

(define image     (newRGBimage   "width" 256       "height" 256 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer "Type"   2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       Solid Noise    diff                       

(define null      (NoiseSolid    "imag"  image     "layer"  backlayer "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define lay2      (CopyLayer     "imag"  image     "layer"  backlayer "2layer" "lay2"  ) )

(define null      (InvertLay     "lay"   lay2                               ) )

(define null      (LayerMode     "lay"   lay2      "mode"   6 ))      ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,ADD7,SUB8

;===========       mergeDwn                              

(define backlayer (MergeDwn      "imag"  image     "layT"   lay2      "layB"   backlayer  ) )

;===========       Levels                              

(define null      (Levels        "layer" backlayer "lowin"  0         "hiin"   109  "gamma" 4.17 "loout" 0 "hout" 255 )) 

;===========       lay2 Rot                              

(define lay2      (CopyLayer     "imag"  image     "layer"  backlayer "2layer" "lay2"  ) )

(define null      (RotSimple     "lay"   backlayer "x90"    0 ))      ;90(0),180(1),270(2)

(define null      (LayerMode     "lay"   lay2      "mode"   4 ))      ;NORM0,DISS1,BEHN2,MULT3,SCREE4,OVLAY5,DIFF6,ADD7,SUB8

(define null      (LayerOpac     "lay"   lay2      "percnt" 60 ))

(define backlayer (MergeDwn      "imag"  image     "layT"   lay2      "layB"   backlayer  ) )


===============WET_STONE=============================================

(define image     (newRGBimage   "width" 500       "height" 500 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(75 77 77) "Back"   '(121 91 50) ) )

(define null      (NoiseSolid    "imag"  image     "layer"  backlayer  "tile" 1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (gradient      "GName"                   "FG to BG (RGB)"   )  )

(define null      (gradMap       "imag"  image    "layer"   backlayer   )  ) 

(define null      (gnoise        "imag"  image    "layer"   backlayer "phot" 3 "appx" 0 "sd" .5 "uni" 0 "lum" 1 "gam" 0 ) ) 

(define lay2      (CopyLayer     "imag"  image    "layer"   backlayer  "2layer" "lay2"  ) )

(define null      (LayerFill     "lay"   lay2     "Type"    2  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image    "layer"   lay2 "tile" 1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define lay3      (CopyLayer     "imag"  image    "layer"   lay2  "2layer" "lay3"  ) )

(define null      (InvertLay     "lay"   lay3 ) )

(define null      (LayerMode     "lay"   lay3      "mode"   6 ));NORM0,DISS1,BEHIN2,MULT3,SCREE4,OVLAY5,DIFF6,ADD7,SUB8

(define lay2      (MergeDwn      "imag"  image     "layT"   lay3   "layB" lay2  ) )

(define null      (LayerActv     "imag"  image     "layer"  backlayer     ))


(plug-in-lighting 1 image backlayer lay2 0 1 0 0 0 '(255 255 255) -1 -1 1 -1 -1 1 1 .21 1 .94 22 1 1 0)


===============DRY_STONE=============================================

(define image     (newRGBimage   "width" 500         "height"  500 ) )

(define null      (SetColors     "fore" '(75 77 77 ) "Back"    '(121 91 50) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image       "layer"  backlayer "tile"   1 "turb" 0 "detail" 15 "radx" 4 "rady" 4) )

(define null      (gradMap       "imag"  image       "layer"  backlayer   )  ) 


(define null      (gnoise        "imag"  image       "layer"  backlayer "phot" 0 "appx" 0 "sd" 0 "uni" 25 "lum" 1 "gam" 1 ) ) 


(define displas   (CopyLayer     "imag"  image       "layer"  backlayer  "2layer" "displas"  ) ) 

(define null      (LayerFill     "lay"   displas     "Type"   2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image       "layer"  displas   "tile"   1 "turb" 0 "detail" 15 "radx" 4 "rady" 4) )

(define null      (lighting      "imag"  image       "layer"  backlayer "bump" displas  

                                                       "bt lt col            px    py   pz dx dy dz ai di dr sr hi"

                                                        0  0  '(255 255 255) -1.67 -1.5 3 -1 -1 1 .5 .5 .1 .2 3 ))

(define null      (LayerVis      "layer" displas     "ON/Off"  0             ))





===============ROUGH_STONE=============================================



(define image     (newRGBimage   "width" 512       "height" 512 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)    "Back"   '(255 255 255) ) )

(define null      (NoiseSolid    "imag"  image     "layer"   backlayer "tile" 1 "turb" 0 "detail" 15 "radx" 4 "rady" 4) )

(define null      (Unsharp       "imag"  image     "layer"   backlayer "rad val thres" 5 3.5 0) )

(define null      (emboss        "imag"  image     "layer"   backlayer "azi elev depth embos" 90 40 20 0) )

(define null      (seamless      "imag"  image     "layer"   backlayer   ) )

(define colorlay  (CopyLayer     "imag"  image     "layer"   backlayer  "2layer" "colorlay"  ) )

(define null      (LayerFill     "lay"   colorlay  "Type"    1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image     "layer"   colorlay "tile" 1 "turb" 0 "detail" 2 "radx" 4 "rady" 4) )

(define null      (LayerMode     "lay"   colorlay  "mode"    5 ));NORM0,DISS1,BEHIN2,MULT3,SCREE4,OVLAY5,DIFF6,ADD7,SUB8

(define null      (BritContas    "Lay"   colorlay  "bright"  0 "contrast" -50  ) ) 

(define null      (colorize      "Lay"   colorlay  "hue sat lit" 42 50 -8  ) )  


===============ZINC_PLATED=============================================


 


(define image     (newRGBimage   "width" 312       "height" 312 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)    "Back"   '(255 255 255) ) )

(define null      (Plasma        "imag"  image     "layer"   backlayer "seed turb" (rand 65535) 7  ) ) 

(define null      (Desat         "layer" backlayer   ))

(define null      (SelectColor   "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 60 ) )

(define null      (BritContas    "Lay"   backlayer  "bright"  69 "contrast" -56  ) ) 

(define null      (SelectNone    "image" image       )) 

(define null      (slur          "imag"  image     "layer"   backlayer "rndpct rndcount randze seed" 1 17 10 11  ) ) 

(define null      (oilify        "imag"  image     "layer"   backlayer "mask-size mode" 9 1  ) ) 




===============ELECTRIC=============================================



(define image     (newRGBimage   "width" 400        "height" 400 ) )

(define backlayer (NameBackLayer "imag"  image       "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)      "Back"   '(255 255 255) ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

;===========       solidNoise     backlayer       

(define null      (NoiseSolid    "imag"  image     "layer"  backlayer "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (AddAlpha      "layer" backlayer   )     )

;===========       copy2          different to lay1    

(define lay1      (CopyLayer     "imag"  image     "layer"  backlayer "2layer" "lay1"  ) )

(define null      (InvertLay     "lay"   lay1                               ) )

(define null      (LayerMode     "lay"   lay1      "mode"   6 ))      ;NORM0,DISS1,BEHN2,MULT3,SCREE4,OVLAY5,DIFF6,ADD7,SUB8

;===========       merge to       backlay    

(define backlayer (MergeDwn      "imag"  image     "layT"   lay1      "layB"   backlayer  ) )

(define null      (InvertLay     "lay"   backlayer                               ) )

;===========      addjusrt        levels    

(define null      (Levels        "layer" backlayer "lowin"  0 "hiin"   255  "gamma" .12 "loout" 0 "hout" 255 ))

(define null      (colorize      "lay"   backlayer  "hue sat lit"  308 85 19         ) )



===============GUNGE=============================================

(define image     (newRGBimage   "width" 400         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;First Brush

(getbrush  ) ;   "18_Spots"

(define null      (Brushset      "BName" "18_Spots"                )      ) 

(define null      (RandPaint     "layer" backlayer   "numpt"   60 "xscale" 400 "yscale" 150  ) )

;First Blur

(define null      (MotionBlur    "imag"  image       "Lay"    backlayer "typ len ang centx centy" 0 256 0 0 0 ));lin0,rad1

;Second Brush

(define null      (SetColors     "fore"  '(255 255 255)     "Back"  '(0 0 0 )  ) )

(define null      (RandPaint     "layer" backlayer   "numpt"   10 "xscale" 400 "yscale" 150  ) )

;Second Blur

(define null      (MotionBlur    "imag"  image       "Lay"    backlayer "typ len ang centx centy" 0 256 0 0 0 ));lin0,rad1    

(define null      (MotionBlur    "imag"  image       "Lay"    backlayer "typ len ang centx centy" 0 256 180 0 0 ));lin0,rad1    

(define null      (LayerMode     "lay"   backlayer   "mode"   5 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

;Second Layer

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay1"  ) ) 

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define null      (RandPaint     "layer" lay1   "numpt"   30 "xscale" 400 "yscale" 150  ) )

(define null      (SetColors     "fore"  '(255 255 255)     "Back"  '(0 0 0 )  ) )

(define null      (RandPaint     "layer" lay1   "numpt"   10 "xscale" 400 "yscale" 150  ) )

(define null      (MotionBlur    "imag"  image       "Lay"    lay1 "typ len ang centx centy" 0 125 180 0 0 ));lin0,rad1

(define null      (Gauss         "imag"  image       "Lay"    lay1    "xRad" 15 "yRad" 15 )   )

(define null      (LayerMode     "lay"   lay1   "mode"   5 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

;Third Layer

(define colbal    (CopyLayer     "imag"  image       "layer"  backlayer  "2layer" "colbal"  ) ) 

(define null      (NoiseSolid    "imag"  image       "layer"  colbal "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (ColBal        "layer"  colbal  "lev cya2red mag2grn yel2blu" 1 72 8 -18  )); 0->2 Shad=>lit 

;First grung

(define grung     (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "grung"  ) ) 

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(getbrush  ) ; "18_Spots"

(define null      (Brushset      "BName""GIMP Brush#10"                )      ) 

(define null      (RandPaint     "layer" grung   "numpt"   100 "xscale" 400 "yscale" 150  ) )

;second grung

(define null      (SetColors     "fore"  '(255 255 255)     "Back"  '(0 0 0 )  ) )

(define null      (Brushset      "BName""GIMP Brush#11"                )      ) 

(define null      (RandPaint     "layer" grung   "numpt"   100 "xscale" 400 "yscale" 150  ) )


    

(define image     (newRGBimage   "width" 300         "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"     2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (RGBnois       "imag"  image       "Layer"    backlayer "indepen? corre? r g b a" 0 0 .3 .3 .3 0 ))  

;RGB_Noise1

                  (plug-in-blur 1 image backlayer )

;blur1

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay1"  ) ) 

(define null      (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

(define null      (SelectAll     "imag"  image                   )) 

(define null      (BuckFill      "lay"   lay1      "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (RGBnois       "imag"  image       "Layer"    lay1  "indepen? corre? r g b a" 0 0 .5 .5 .5 0 ))  

;after RGB_Noise1

(define null      (MotionBlur    "imag"  image       "Lay"    lay1 "typ len ang centx centy" 0 40 90 0 0 ));lin0,rad1    

;after blur2

(define null      (thresshold    "lay"   lay1         "minlev maxlev"  112 255   )) 

;after thresshold

(define null      (LayerMode     "lay"   lay1        "mode"   3 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define backlayer (MergeDwn      "imag"  image       "layT"   lay1      "layB"   backlayer  ) )

;after merge

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay1"  ) )

(define null      (NoiseSolid    "imag"  image       "layer"   lay1       "tile"   1 "turb" 0 "detail" 2 "radx" 2 "rady" 2) )

(define null      (thresshold    "lay"   lay1         "minlev maxlev"  117 255   ))

(define null      (SelectColor   "layer" lay1   "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SetColors     "fore" '(220 220 220 )    "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   lay1    "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    lay1    "xRad" 25 "yRad" 25 )   )

;after threshold solid noise

(define null      (LayerMode     "lay"   lay1        "mode"   3 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define backlayer (MergeDwn      "imag"  image       "layT"   lay1      "layB"   backlayer  ) )

;after merge

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay1"  ) )

(define null      (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

(define null      (SelectAll     "imag"  image                   )) 

(define null      (BuckFill      "lay"   lay1      "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (RGBnois       "imag"  image       "Layer"   lay1  "indepen? corre? r g b a" 0 0 .5 .5 .5 0 ))  

                  (plug-in-blur 1 image  lay1 )

;after RGB noise

(define lay2      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay2"  ) )

(define null      (NoiseSolid    "imag"  image       "layer"   lay2       "tile"   1 "turb" 0 "detail" 1 "radx" 8 "rady" 8) )

(define null      (thresshold    "lay"   lay2         "minlev maxlev"  78 255   ))

(define null      (Gauss         "imag"  image       "Lay"    lay2    "xRad"32 "yRad" 32 )   )

;after solid noise

(define null      (LayerMode     "lay"   lay2        "mode"   10 )) ;ADD7,SUB8,DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define lay1      (MergeDwn      "imag"  image       "layT"    lay2      "layB"   lay1  ) )

(define null      (LayerMode     "lay"   lay1        "mode"   3 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

;after multiply and merge down



===============PERLIN_FOG=============================================



;===========       Transp         lay   

(define image     (newRGBimage   "width" 400        "height" 400 ) )

(define backlayer (NameBackLayer "imag"  image       "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)      "Back"   '(255 255 255) ) )

(define null      (AddAlpha      "layer" backlayer                   )     )

(define null      (LayerFill     "lay"   backlayer   "Type"    3  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       Noise          lay   

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image       "layer"  lay1 "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (Levels        "layer" lay1        "lowin"  89 "hiin"   160  "gamma" 1 "loout" 0 "hout" 255 ))

(define null      (LayerVis      "layer" lay1        "ON/Off"  0             ))

(define null      (InvertLay     "lay"   lay1                ) )

;===========       red            lay   

(define lay2      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay2"  ) ) 

(define null      (SetColors     "for" '(255 0 0)      "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   lay2   "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       copy noise 2   mask

(define mask      (AddWhiteMask  "lay"   lay2                      ) ) 

(define null      (Copy2         "layer" lay1   "2layer"  mask  ) ) 

(define null      (AnchrFloat    "imag"  image                     ) )


===============SIMPSON_CLOUDS=============================================

 


;===========       Transp         lay   

(define image     (newRGBimage   "width" 400        "height" 400 ) )

(define backlayer (NameBackLayer "imag"  image       "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)      "Back"   '(255 255 255) ) )

(define null      (AddAlpha      "layer" backlayer                   )     )

(define null      (LayerFill     "lay"   backlayer   "Type"    3  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       Noise          lay   

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (NoiseSolid    "imag"  image       "layer"  lay1 "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (Levels        "layer" lay1        "lowin"  89 "hiin"   160  "gamma" 1 "loout" 0 "hout" 255 ))

(define null      (LayerVis      "layer" lay1        "ON/Off"  0             ))

(define null      (InvertLay     "lay"   lay1                ) )

;===========       motionblur     lay   

(define null      (MotionBlur    "imag"  image       "Lay"    lay1 "typ len ang centx centy" 0 111 0 0 0 ));lin0,rad1    

(define null      (Levels        "layer" lay1        "lowin"  89 "hiin"   160  "gamma" 1 "loout" 0 "hout" 255 ))

;===========       red            lay   

(define lay2      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay2"  ) ) 

(define null      (SetColors     "for" '(255 0 0)      "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   lay2   "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       copy noise 2   mask

(define mask      (AddWhiteMask  "lay"   lay2                      ) ) 

(define null      (Copy2         "layer" lay1   "2layer"  mask  ) ) 

(define null      (AnchrFloat    "imag"  image                     ) ) 




  

===============REFLECTIVE_GRADIENTS=========================================

 


(define image     (newRGBimage   "width" 1000        "height" 1000 ) )

(define backlayer (NameBackLayer "imag"  image       "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)      "Back"   '(255 255 255) ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (RandGrad      "layer" backlayer   "numb" 30  )   )

(define lay1      (CopyLayer     "imag"  image       "layer"  backlayer "2layer" "lay1"  ) )

(define null      (FlipAround    "layer" lay1        "fliptype" 0 "axis"  500   ) ) ;HOR(0),VERT1) 

(define null      (LayerMode     "lay"   lay1        "mode"   10 ))  ;DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define Hmirror   (MergeDwn      "imag"  image       "layT"   lay1     "layB"   backlayer  ) )

(define lay1      (CopyLayer     "imag"  image       "layer"  Hmirror "2layer" "lay1"  ) )

(define null      (FlipAround    "layer" lay1        "fliptype" 1 "axis"  500   ) ) ;HOR(0),VERT1) 

(define null      (LayerMode     "lay"   lay1        "mode"   10 ))  ;DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define Qmirror   (MergeDwn      "imag"  image       "layT"   lay1     "layB"   Hmirror  ) )

(define lay1      (CopyLayer     "imag"  image       "layer"  Qmirror "2layer" "lay1"  ) )

(define null      (SetColors     "for" '(255 255 255)"Back"   '(0 0 255) ) )

(define null      (RadFG2BGrad   "layer" lay1        "x1 y1 x2 y2"   500 500 0 0 )  )

(define null      (LayerMode     "lay"   lay1        "mode"   17 )) ;DODG16,BURN17,HARD18,SOFT19,EXTR20,MERG21

(define Total     (MergeDwn      "imag"  image       "layT"   lay1     "layB"   Qmirror  ) )

(define null      (NameLayer     "layer" Total       "Laynam" "Total" ) )



==============CREATE_PINE=====================================


(define image     (newRGBimage   "width"  600         "height" 600 ) )

(define backlayer (NameBackLayer "imag"   image       "Laynam" "backlayer" ) )

(define null      (SetColors     "for"  '(156 114 54) "Back"   '(200 172 95) ) )

(define null      (BuckFill      "lay"    backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (Brushset      "BName" "ahair brush"  )      ) 

(define null      (PaintALine    "layer"  backlayer  "x1 y1 x2 y2" 100 33  200 568 ) ) 

(define null      (PaintALine    "layer"  backlayer  "x1 y1 x2 y2" 180 33  300 568 ) ) 

(define null      (PaintALine    "layer"  backlayer  "x1 y1 x2 y2" 280 33  300 568 ) ) 

(define null      (PaintALine    "layer"  backlayer  "x1 y1 x2 y2" 400 33  500 568 ) ) 

(define null      (Ripple        "imag"   image      "Layer" backlayer "period ampl orient" 179 98 0  )  ); Hor0, Vert1 

(define null      (gnoise        "imag"   image      "layer" backlayer "phot" 0 "appx" 0 "sd" 0 "uni" 85 "lum" 1 "gam" 1 ) ) 

                  (gimp-drawable-transform-rotate-default backlayer 1.5708 1 0 0 0 0)

(define null      (MotionBlur    "imag"   image      "Lay"  backlayer "typ len ang centx centy" 0 54 90 0 0 ));lin0,rad1 


 

===================

(define null      (RotLayerAt    "lay"    backlayer  "angle auto centx centy" 1.5708 1 300 300 ) )




====================Wood_Grain============================================



(define image     (newRGBimage   "width" 300         "height"  350 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

                  (script-fu-wood-grain  image 9 1) 


========================

(script-fu-wood-grain run-mode image xsize ysize)

(script-fu-register "script-fu-wood-grain"

                    "Wood Grain..."

)


(script-fu-menu-register "script-fu-wood-grain2" "<Image>/Filters/Will's Script Pack")



====================Wood_Grain2============================================



(define image     (newRGBimage   "width" 300         "height"  350 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

                  (script-fu-wood-grain2 image 9 1 1 15 "Browns")


========================================


(script-fu-wood-grain2 run-mode image value value toggle value gradient)




================SELECTION_TYPES===============================

(define image     (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;Several types of selection addition and subtraction

(define null      (SelRect       "imag"  image       "x y w h mode" 10 10 50 50 0 )); ADD0,SUB1,REP2,INTE3

(define null      (SelRect       "imag"  image       "x y w h mode" 30 30 40 60 0 )); ADD0,SUB1,REP2,INTE3

(define null      (SelEllipse    "imag"  image       "x y w h Rfeath mode" 100 70 50 50 0 0)); ADD0,SUB1,REP2,INTE3

(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 100 41 1 )); ADD0,SUB1,REP2,INTE3

(define vdata     (vector         170 30 200 30 200 50 170 30 ) ) ; #( x0 y0 x1 y1 x2 y2 x0 y0 )

(define null      (SelFree       "imag"  image       "num vector mode Rfeath" 8 vdata 0 0 )); ADD0,SUB1,REP2,INTE3

;Convert selections to paths 

(define null      (Sel2path      "imag"  image        "lay"   backlayer     ) ) 

(define activVect (vectorGet     "imag"  image    )  )

(define null      (vectorVis     "path"  activVect  "vis" 1  )  )

(define null      (SelectNot     "imag"  image                  )) 


================================

(script-fu-carve-it 1 image backlayer lay1 0 )

(script-fu-carve-it run-mode image drawable mask whit?)




=================SELECTION_DISTORTION===============================

 


(define image     (newRGBimage   "width" 300         "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;Create Square selections

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (SelRect       "imag"  image       "x y w h mode" 50 50 100 100 0 )); ADD0,SUB1,REP2,INTE3

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  ))

;Create randomnize, blur and threshold

(define null      (spread        "imag"  image        "lay"   lay1   "xval yval"  200 200     )) 

(define null      (quass_iir     "imag"  image        "lay"   lay1   "rad blurx blury"  12 12  12   )) 

(define null      (thresshold    "lay"   lay1         "minlev maxlev"  130 255   )) 

(define null      (SelectColor   "layer" lay1         "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (LayRemov      "imag"  image        "layer"   lay1        )) 



=================SELECT_DISTRESS===============================



(define image     (newRGBimage   "width" 300         "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (SelRect       "imag"  image       "x y w h mode" 50 50 100 100 0 )); ADD0,SUB1,REP2,INTE3

;Distress the selection

                  (script-fu-distress-selection image backlayer 127 8 4 2 1 1)

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  ))


============================

(script-fu-distress-selection run-mode image drawable thres spread gran smooth vert hor)







==================PERSPECTIVE_WAVES=============

  

(define image     (newRGBimage   "width" 700         "height"  700 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;(define null     (gnoise        "imag"  image       "layer"  backlayer "phot" 3 "appx" 0 "sd" .5 "uni" 0 "lum" 1 "gam" 0 ) ) 

(define null      (NoiseSolid    "imag"  image       "layer"  backlayer "tile"   1 "turb" 0 "detail" 1 "radx" 16 "rady" 16) )

(define null      (Gauss         "imag"  image       "Lay"    backlayer    "xRad" 2 "yRad" 2 )   )

(define null      (emboss        "imag"  image       "layer"  backlayer "azi elev depth embos" 90 40 5 1) )

                  (gimp-drawable-transform-perspective-default  backlayer 300 0 400  0  0 700 700 700 1 0)

(define null      (ImagScale     "image" image        "w h inter" 800 130 1 ) )

(define null      (MotionBlur    "imag"  image       "Lay"    backlayer "typ len ang centx centy" 0 35 0 0 0 ));lin0,rad1    




===============whirl-pinch_distort================================

 

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

                  (plug-in-grid 1 image  backlayer 1 5 8 '(0 0 0) 255 1 5 8 '(0 0 0) 255 0 2 6 '(0 0 0) 255)

(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 100 100 0 )); ADD0,SUB1,REP2,INTE3

                  (plug-in-whirl-pinch 1 image backlayer 90 0 1)


=====================================

                  (plug-in-whirl-pinch run-mode image drawable whirlangle pinchMagnitude radius)



=============displace_Distort=======================================

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image        "lay" backlayer "w dx dy xoff yoff"  1 8 8 4 4 ))

;                 (plug-in-grid 1 image backlayer 1 5 8 '(0 0 0) 255 1 5 8 '(0 0 0) 255 0 2 6 '(0 0 0) 255)

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 50 50 0 )); ADD0,SUB1,REP2,INTE3

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    lay1      "xRad" 35 "yRad" 35 )   )

(define null      (LayerActv     "imag"  image       "layer"  backlayer     ))

;(define null     (InvertLay     "lay"   lay1                ) )

(define null      (LayerVis      "layer" lay1   "ON/Off"  0             ))

;(define null     (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

;(define null     (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

                  (plug-in-displace 1 image backlayer 10 0 1 0 lay1 lay1 1); wrap,smear,black


=================================================

(plug-in-grid run-mode image drawable hwidth hspace hoffset hcolor hopacity vwidth vspace voffset vcolor vopacity iwidth ispace ioffset icolor iopacity)




=============warp_Distort=======================================



 


(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image        "lay" backlayer "w dx dy xoff yoff"  1 8 8 4 4 ))


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 50 50 0 )); ADD0,SUB1,REP2,INTE3

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    lay1      "xRad" 35 "yRad" 35 )   )

(define null      (LayerActv     "imag"  image       "layer"  backlayer     ))

(define null      (InvertLay     "lay"   lay1                ) )

(define null      (LayerVis      "layer" lay1   "ON/Off"  0             ))


;(define null      (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

;(define null      (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


                   (plug-in-warp 1 image backlayer 30 lay1 1 0 0 0 lay1 0 1 0 0 0 0 0)


======================================


(plug-in-warp run-mode image drawable amount warp-map iter dither angle wrap-type mag-map mag-use substeps grad-map grad-scale vector-map vector-scale vector-angle)



=====================DITHER============================================


(script-fu-rectangle-path run-mode image drawable string t l b r stroke color fill color)


 

(define image     (newRGBimage   "width" 300       "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       select Rect     

(define null      (SelectAddRect "image" image     "x_upl"   50  "y_upl" 50  "w"  150  "h" 150 ))

;===========       gradient     

(define null      (LinFG2BGGrad  "layer" backlayer "x1 y1 x2 y2"  20 20 150 150  )  )

;===========       dither     

(define backlayer (ToBW          "image" image     "dither"  1  ) ) ; NONE0,FS-DITH1,FSLOWBLEED2,FIXED3


(define backlayer (ToBW          "image" image     "dither"  0  ) ) ; NONE0,FS-DITH1,FSLOWBLEED2,FIXED3


===================SKETCH==============================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (sketch  image backlayer '(255 255 0 ))



===================PENCIL_DRAW==============================================

;===========       Angela                       

(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/AngelinaJolie.jpg" )

(define image     (Load-jpg      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (AddAlpha      "layer" backlayer                   )     )

;===========       Lay1           desat                       

(define Lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "Lay1"  ) ) 

(define null      (Desat         "layer" Lay1                 ))

;===========       Lay2           invert blur opac    merge                    

(define Lay2      (CopyLayer     "imag"  image       "layer"   Lay1       "2layer" "Lay2"  ) ) 

(define null      (InvertLay     "lay"   Lay2                ) )

(define null      (Gauss         "imag"  image       "Lay"     Lay2       "xRad" 5 "yRad" 5 )   )

(define null      (LayerOpac     "lay"   Lay2        "percnt"  50 ))

(define mergelay  (MergeDwn      "imag"  image       "layT"    Lay2       "layB"   Lay1  ) )

;===========       dodge          dodge  merge                       

(define dodge     (CopyLayer     "imag"  image       "layer"   mergelay   "2layer" "dodge"  ) ) 

(define null      (LayerMode     "lay"   dodge       "mode"    16 ))      ;DODG16,BURN17,HARD18,SOFT19,EXTR20,MERG21

(define mergelay  (MergeDwn      "imag"  image       "layT"    dodge      "layB"   mergelay  ) )

;===========       sharp          contrast                                 

(define null      (Unsharp       "imag"  image       "layer"   mergelay   "rad val thres" 60 10 0) )

(define null      (BritContas    "Lay"   mergelay  "bright"   -51         "contrast" 127  ) )  



===================OUTLINE_WITH_SHADE==============================================


(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/AB_input.jpg" )

(define image     (Load-jpg      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (Gauss         "imag"  image       "Lay"     lay1    "xRad" 1 "yRad" 1 )   )

(define null      (BritContas    "Lay"   lay1        "bright" -123 "contrast" 127  ) ) 

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define null      (SelectColor   "layer" lay1        "color"   '(0 0 0 ) "thresshold" 30 ) )

(define null      (grow          "imag"  image       "value"   1   )  )

(define null      (BuckFill      "lay"   lay1        "fill"    0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone    "image" image                  )) 

(define null      (Gauss         "imag"  image       "Lay"     lay1    "xRad" 5 "yRad" 5 )   )

(define null      (Color2Alph    "imag"  image       "layer"   lay1  "color" '(255 255 255) ) )


(define lay2      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay2"  ) ) 

(define null      (Gauss         "imag"  image       "Lay"     lay2    "xRad" 1 "yRad" 1 )   )

(define null      (BritContas    "Lay"   lay2        "bright" -80 "contrast" 127  ) )  

(define null      (SelectColor   "layer" lay2        "color"   '(0 0 0 ) "thresshold" 30 ) )

(define null      (SetColors     "fore" '(0 150 255) "Back"    '(255 150 0) ) )

(define null      (BuckFill      "lay"   lay2        "fill"    0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone    "image" image                 )) 

(define null      (Color2Alph    "imag"  image       "layer"   lay2  "color" '(255 255 255) ) )


(define null      (LayerFill     "lay"   backlayer        "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


===================RED/BLUE_TO_Left/Right===================================


(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/Red_Blue/StoneHedge.gif" )

(define image     (Load-gif      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (RGBColor      "image" image        ) )


(define Arrxywh   (GetxyWH       "draw"  backlayer ))

(define w         (vector-ref     Arrxywh  2)) ; 190

(define h         (vector-ref     Arrxywh  3)) ; 100    1008/18 = 56

(define scale     ( / w 300)) 

(define h2        ( / h scale))        

(define null      (ImagScale     "image" image       "w h inter" 300 ( / h scale) 1 ) )

(define rlay      (CopyLayer     "imag"  image       "layer"     backlayer  "2layer" "rlay"  ) ) 

(define clay      (CopyLayer     "imag"  image       "layer"     backlayer  "2layer" "clay"  ) ) 

(define null      (SetColors     "fore"'(255 0 0)    "Back"     '(0 0 0) ) )

(define null      (LayerFill     "lay"   clay        "Type"      0  ))      ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (LayerMode     "lay"   clay        "mode"      3 ))       ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define rlay      (MergeDwn      "imag"  image       "layT"      clay       "layB"   rlay  ) )


(define blay      (CopyLayer     "imag"  image       "layer"     backlayer  "2layer" "blay"  ) ) 

(define clay      (CopyLayer     "imag"  image       "layer"     backlayer  "2layer" "clay"  ) ) 

(define null      (SetColors     "fore"'(0 255 255)  "Back"    '(0 0 0) ) )


(define null      (LayerFill     "lay"   clay        "Type"      0  ))      ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (LayerMode     "lay"   clay        "mode"      3 ))       ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define blay      (MergeDwn      "imag"  image       "layT"      clay       "layB"   blay  ) )



(define image2    (newRGBimage   "width" 600         "height"    ( / h scale) ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"      '(255 255 255) ) )

(define backlay2  (NameBackLayer "image" image2      "Layname"   "backlay2" ) )

(define null      (LayerFill     "lay"   backlay2    "Type"      1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SelectAll     "imag"  image                   )) 

(define null      (Copy          "layer" blay    ) ) 

(define float     (PasteClip     "layer" backlay2                     ) )

(define null      (TranslatFloat "imag"  image2       "xlb"      300  "ylb" 0  "xrt" 600  "yrt" h2   ) )

(define null      (AnchrFloat    "imag"  image2  ))


(define null      (Copy          "layer" rlay    ) ) 

(define float     (PasteClip     "layer" backlay2                     ) )

(define null      (TranslatFloat "imag"  image2       "xlb"      0  "ylb" 0  "xrt" 300  "yrt" h2   ) )

(define null      (AnchrFloat    "imag"  image2  ))


(define null      (Desat         "layer" backlay2                 ))


                  (gimp-equalize backlay2 0)



=================================================================


(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/Red_Blue/3D.jpg" )



(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/Red_Blue/drop3d.jpg" )


(define image     (Load-jpg      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )


(define Arrxywh   (GetxyWH       "draw"  backlayer ))

(define w         (vector-ref     Arrxywh  2)) ; 190

(define h         (vector-ref     Arrxywh  3)) ; 100    1008/18 = 56

(define scale     ( / w 300)) 

(define h2        ( / h scale))        

(define null      (ImagScale     "image" image       "w h inter" 300 ( / h scale) 1 ) )

(define rlay      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "rlay"  ) ) 

(define clay      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "clay"  ) ) 

(define null      (SetColors     "fore"'(255 0 0)    "Back" '(0 0 0) ) )

(define null      (LayerFill     "lay"   clay        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (LayerMode     "lay"   clay        "mode"   3 ))  ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define rlay      (MergeDwn      "imag"  image       "layT"    clay      "layB"   rlay  ) )


(define blay      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "blay"  ) ) 

(define clay      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "clay"  ) ) 

(define null      (SetColors     "fore"'(0 255 255)  "Back" '(0 0 0) ) )


(define null      (LayerFill     "lay"   clay        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (LayerMode     "lay"   clay        "mode"   3 ))       ;NORM0,DISS1,BEHI2,MULT3,SCREE4,OVLAY5,DIFF6,

(define blay      (MergeDwn      "imag"  image       "layT"    clay      "layB"   blay  ) )



(define image2    (newRGBimage   "width" 600         "height"  ( / h scale) ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlay2  (NameBackLayer "image" image2      "Layname" "backlay2" ) )

(define null      (LayerFill     "lay"   backlay2    "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SelectAll     "imag"  image                   )) 

(define null      (Copy          "layer" blay    ) ) 

(define float     (PasteClip     "layer" backlay2                     ) )

(define null      (TranslatFloat "imag"  image2       "xlb" 300  "ylb" 0  "xrt" 600  "yrt" h2   ) )

(define null      (AnchrFloat    "imag"  image2  ))


(define null      (Copy          "layer" rlay    ) ) 

(define float     (PasteClip     "layer" backlay2                     ) )

(define null      (TranslatFloat "imag"  image2       "xlb" 0  "ylb" 0  "xrt" 300  "yrt" h2   ) )

(define null      (AnchrFloat    "imag"  image2  ))


(define null      (Desat         "layer" backlay2                 ))


                   (gimp-equalize backlay2 0)




================Convert_Black_to_Transparent=======================================


(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/stars.jpg" )

(define image     (Load-jpg      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (AddAlpha      "layer" backlayer                   )     )

;Adjust Levels

(define null      (Levels        "layer" backlayer   "lowin"  72   "hiin"   255 "gamma" 1 "loout" 0 "hout" 255 ))  

;Convert Black to alpha on a top layer

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (Color2Alph    "imag"  image       "layer"   lay1       "color" '(0 0 0) ) )

;Make lower layer black

(define null      (SetColors     "fore"'(0 0 0)"Back"    '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 



==================Liquid_Rescale===============================================


=====================Gradients_in_Text========================

 

;===========       new                       

(define null      (SetColors       "fore"    '(0 0 0 ) "Back"    '(255 255 255) ) )

(define image     (newRGBimage     "width"   300       "height"  150 ) )

(define backlayer (NameBackLayer   "image"   image     "Layname" "backlayer" ) )

(define null      (SetColors       "fore"    '(0 0 0 ) "Back"    '(255 255 255) ) )

;===========       text                       

(define null      (Text            "image"   image     "layer"    backlayer "text" "Effects" "font" "Sans Bold" 

                                    "size"    60        "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat      "imag"    image      ) )  

;===========       grad text                       

(define null      (SelectColor     "layer"   backlayer  "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SetColors       "fore"    '(0 0 0 )  "Back"    '(255 0 0) ) )

(define null      (LinFG2BGGrad    "layer"   backlayer  "x1 y1 x2 y2"  20 20 150 150  )  )

;===========       stroke text                       

(define null      (Brushset        "BName"   "Circle (03)"  )      ) 

(define null      (StrokeSel       "layer"   backlayer   )     ) 

(define null      (SelectNot       "imag"    image )   ) 

;===========       trans backgrd                       

(define null      (SelectColor     "layer"   backlayer  "color"   '(255 255 255 ) "thresshold" 10 ) )

(define null      (AddAlpha        "layer"   backlayer   )     )

(define null      (Color2Alph      "imag"    image      "layer"  backlayer  "color" '(255 255 255) ) )

(define null      (SelectNot       "imag"    image )   ) 


======================Paper_Cut_Text===========================================



(define image     (newRGBimage   "width" 400         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (SetColors     "fore"'(175 174 178)"Back"    '(214 213 218) ) )


(define null      (SetGrad       "Name"  "FG to BG (RGB)"  ))

(define null      (LinFG2BGGrad  "layer" backlayer   "x1 y1 x2 y2"  0 125 400 150  )  )


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define txtfloat  (Text          "imag"  image       "layer"    lay1      "text" "paper cut project" "font" "Utopia Bold" 

                                  "size"  45          "xlt"      20        "ylt"  100  ))

(define null      (AnchrFloat    "imag"  image                     ) ) 


(define lay2      (CopyLayer     "imag"  image       "layer"   lay1       "2layer" "lay2"  ) )

(define lay3      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay3"  ) )

(define null      (InvertLay     "lay"   lay2                ) )


(define mask3     (AddWhiteMask  "lay"   lay3                    ) ) 

(define null      (Copy2         "layer" lay2         "2layer"  mask3  ) ) 

(define null      (AnchrFloat    "imag"  image                     ) ) 


(define null      (Color2Alph    "imag"  image       "layer"    lay1     "color" '(255 255 255) ) )

(define null      (Color2Alph    "imag"  image       "layer"    lay2     "color" '(0   0   0) ) )

(define null      (LayOffset     "layer" lay2        "offx"     1        "offy" 1   ) )

(define null      (LayOffset     "layer" lay1        "offx"     -1       "offy" -1   ) )



======================Bevel_Text===========================================



(define image     (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (SetColors     "fore"'(210 210 210)"Back"    '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define bump      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "bump"  ) ) 

(define null      (HSVBnois      "image" image       "Layer"   bump        "hold hue sat val" 4 81 62 62 ))  


(define null      (bumpmap       "image" image       "layer"  backlayer    "bump" bump  "azi elev depth amb"  182 53 3 129 ))

(define null      (LayerVis      "layer" bump        "ON/Off"  0             ))



(define lay1      (mkTranslayer  "imag"  image       "fromlay" backlayer    "tolay" "Lay1") )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )


(define txtfloat  (Text          "imag"  image       "layer"    lay1        "text" "BEVEL" "font" "Utopia Bold" 

                                  "size"  75          "xlt"      20          "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image                     ) ) 


(define lay2      (CopyLayer     "imag"  image       "layer"   lay1          "2layer" "lay2"  ) ) 


(define null      (SelectColor   "layer" lay2        "color"   '(0 0 0 )     "thresshold" 10 ) )

(define null      (LayerFill     "lay"   lay1        "Type"    3  ))         ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (shrink        "imag"  image       "value"   1   )  )

(define null      (BuckFill      "lay"   lay1        "fill"    1   )   )     ;FG(0),BG(1),PATTERN(2) 

(define null      (MoveLayer     "Lay"   lay1        "offx"    2             "offy" 2 ) )

(define null      (SelectNone    "image" image                  )) 


(define null      (Gauss         "imag"  image       "Lay"     lay1          "xRad" 3 "yRad" 3 )   )


======================Western_Text===========================================


(define image     (newRGBimage   "width" 530       "height" 300 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(167 62 67) "Back"   '(192 115 37) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define textlay   (CopyLayer     "imag"  image      "layer"  backlayer  "2layer" "textlay"  ) )

(define null      (SetColors     "for" '(0 0 0)     "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   textlay    "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define txtfloat  (Text          "imag"  image      "layer"  backlayer "text" "SUGAR" "font" "Times Bold" 

                                  "size"  140        "xlt"      20        "ylt"  20  ))

(define null      (Cut2Clip      "imag"  image ))  

(define fromClip  (PasteClip     "layer" textlay  ) )

(define null      (AnchrFloat    "imag"  image      ) )   

(define null      (AddAlpha      "layer" textlay   )     )

(define null      (Color2Alph    "imag"  image      "layer"  textlay  "color" '(255 255 255) ) )

(define WhiteLay  (CopyLayer     "imag"  image      "layer"  textlay  "2layer" "WhiteLay"  ) )

(define null      (SelectColor   "layer" textlay    "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image      "value"  5   )  )

(define null      (BuckFill      "lay"   WhiteLay   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (LayOffset     "layer" WhiteLay   "offx"   4 "offy" 4   ) )

(define bwnLay    (CopyLayer     "imag"  image      "layer"  textlay  "2layer" "bwnLay"  ) )

(define null      (SelectColor   "layer" textlay    "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image      "value"  5   )  )

(define null      (SetColors     "for"  '(0 0 0)    "Back"   '(192 115 37) ) )

(define null      (BuckFill      "lay"   bwnLay     "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define TopText   (CopyLayer     "imag"  image      "layer"  textlay  "2layer" "WhiteLay"  ) )

(define null      (SelectColor   "layer" textlay    "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SetColors     "for" '(167 62 67) "Back"   '(192 115 37) ) )

(define null      (BuckFill      "lay"   TopText    "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (Brushset      "BName" "Circle (03)"                         )      ) 

(define null      (SetColors     "for" ' (0 0 0)    "Back"   '(192 115 37) ) )

(define null      (StrokeSel     "layer" TopText   )     ) 

(define null      (shrink        "imag"  image      "value"  6   )  )

(define null      (SetColors     "for" '(92 55 57)  "Back"   '(192 115 37) ) )

(define null      (BuckFill      "lay"   TopText     "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone    "image" image       )) 

(define null      (Flatten       "image" image       )) 

  

  


======================HalfTone_Text===========================================

 


(define image     (newRGBimage   "width" 300       "height" 150 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)     "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (Text          "imag"  image      "layer"    backlayer "text" "halftone" "font" "Serif" 

                                  "size"  60         "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image      ) )  

(define blurlay   (CopyLayer     "imag"  image      "layer"  backlayer  "2layer" "blurlay"  ) )

(define null      (Gauss         "imag"  image      "Lay"    blurlay    "xRad" 35 "yRad" 35 )   )

(define null      (BritContas    "Lay"   blurlay    "bright" -91 "contrast" 83  ) )  

(define null      (NewsPrint     "imag"  image      "Laynam" blurlay ) )

(define null      (InvertLay     "lay"   backlayer ) )

(define null      (Color2Alph    "imag"  image      "layer"  backlayer  "color" '(0 0 0) ) )

(define null      (LayerUp       "imag"  image      "Laynam" backlayer ) )



======================CHISELED_Text===========================================


; =================create a Marble Background================================


(define image     (newRGBimage   "width" 450       "height" 150 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0)    "Back"   '(255 255 255) ) )

(define null      (SetPattern    "name" "Pink Marble"  )) 

(define null      (BuckFill      "lay"   backlayer   "fill"   2   )   ) ;FG(0),BG(1),PATTERN(2)

(define textlay   (CopyLayer     "imag"  image      "layer"  backlayer  "2layer" "textlay"  ) )

(define null      (LayerFill     "lay"   textlay    "Type"   2  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define txtfloat  (Text          "imag"  image     "layer"    textlay "text" "CHISELED" "font" "Baskerville Bold" 

                                  "size"  72        "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image      ) )   

(define null      (AddAlpha      "layer" textlay   )     )

(define null      (Color2Alph    "imag"  image      "layer"  textlay  "color" '(255 255 255) ) )

(define shadLay   (CopyLayer     "imag"  image      "layer"  textlay  "2layer" "shadLay"  ) )

(define texttmp   (CopyLayer     "imag"  image      "layer"  textlay  "2layer" "texttmp"  ) )

(define null      (blurlayer     "imag"  image      "layer"  shadLay   )     )

(define null      (LayOffset     "layer" shadLay    "offx"   4 "offy" 4   ) )

(define null      (LayerDwn      "imag"  image      "Layer"  shadLay ) )

(define null      (LayerOpac     "lay"   shadLay    "percnt" 50 ))


(define null      (SelectColor   "layer" textlay    "color"  '(0 0 0 ) "thresshold" 10 ) )


                  (gimp-edit-blend textlay FG-BG-RGB-MODE 0 GRADIENT-SHAPEBURST-SPHERICAL 100 0 0 0 0 1 0 1 0 0 1 1)


(define null      (BritContas    "Lay"   textlay    "bright" 80 "contrast" 68  ) )  

(define null      (SelectNone    "image" image       )) 



(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" textlay  "azi elev depth amb"  47 40 30 100 )) 


(define null      (LayerVis      "layer" texttmp    "ON/Off"   0             ))

(define null      (LayerVis      "layer" shadLay    "ON/Off"   0             ))

(define null      (LayerVis      "layer" textlay    "ON/Off"   0             ))


(define TopLay    (CopyLayer     "imag"  image      "layer"  backlayer  "2layer" "TopLay"  ) )


(define null      (Alph2Sel      "layer" texttmp                ))

(define null      (SelectInvert  "image" image ) )

(define null      (CutSelect     "layer" TopLay  ))  

(define null      (SelectNone    "image" image       )) 


(define null      (LayerVis      "layer" texttmp    "ON/Off"   1             ))

(define null      (LayerVis      "layer" shadLay    "ON/Off"   1             ))


======


(define null      (SetColors     "for" '(255 255 255)    "Back"   '(0 0 0) ) )

(define null      (Shapeburst    "layer" textlay      ) )



======================OUTLINED_Text===========================================

(define image     (newRGBimage   "width" 300       "height" 150 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for" '(71 185 243) "Back"   '(13 88 207) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define txtlay    (mkTranslayer  "imag"  image     "fromlay"  backlayer   "tolay" "txtlay") )

(define null      (Text          "imag"  image      "layer"    txtlay "text" "OutLine" "font" "Sans Bold" 

                                  "size"  60         "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image      ) )  

(define top       (CopyLayer     "imag"  image      "layer"    txtlay  "2layer" "top"  ) )

(define null      (SelectColor   "layer" top        "color"   '(71 185 243 ) "thresshold" 10 ) )

(define null      (SetColors     "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (Brushset      "BName" "Circle (03)"  )      ) 

(define null      (StrokeSel     "layer" top   )     ) 

(define null      (SelectNot     "imag"  image )   ) 

(define null      (LayerActv     "imag"  image     "layer"    txtlay     ))

(define null      (SelectColor   "layer" txtlay    "color"   '(71 185 243 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image      "value"  4   )  )

(define null      (BuckFill      "lay"   txtlay    "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image )   ) 


(define null      (Gauss         "imag"  image      "Lay"    txtlay    "xRad" 5 "yRad" 5 )   )

===================================================================


(define image     (newRGBimage   "width" 300       "height" 150 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define txtlay    (mkTranslayer  "imag"  image     "fromlay"  backlayer   "tolay" "txtlay") )

(define null      (Text          "imag"  image      "layer"    txtlay "text" "OutLine" "font" "Sans Bold" 

                                  "size"  60         "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image      ) )  


(define outline   (mkTranslayer  "imag"  image     "fromlay"  backlayer   "tolay" "outline") )

(define null      (SelectColor   "layer" txtlay    "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (Brushset      "BName" "Circle (03)"  )      ) 

(define null      (StrokeSel     "layer" outline   )     ) 

(define null      (SelectNot     "imag"  image )   ) 

(define null      (SelectColor   "layer" outline    "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image      "value"  3   )  )

(define null      (BuckFill      "lay"   outline    "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image )   ) 

(define null      (Gauss         "imag"  image      "Lay"    outline    "xRad" 4 "yRad" 4 )   )

(define null      (BuckFill      "lay"   backlayer    "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (LayerUp       "imag"  image      "Laynam" txtlay ) )


======================SHADOWED_Text===========================================



(define image     (newRGBimage   "width" 356       "height" 107 ) )

(define backlayer (NameBackLayer "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors     "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define txtlay    (mkTranslayer  "imag"  image     "fromlay" backlayer   "tolay" "txtlay") )

(define null      (Text          "imag"  image      "layer"  txtlay  "text" "Hello world" "font" "Sans" 

                                  "size"  50         "xlt"    10        "ylt"  10  ))

(define null      (AnchrFloat    "imag"  image      ) )  

(define whit      (CopyLayer     "imag"  image     "layer"   txtlay  "2layer" "whit"  ) )

(define null      (LayerFill     "lay"   whit      "Type"    2  ))   ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define blur      (CopyLayer     "imag"  image     "layer"   txtlay  "2layer" "blur"  ) )

(define whit      (MergeDwn      "imag"  image     "layT"    blur    "layB"   whit  ) )

(define blur      (CopyLayer     "imag"  image     "layer"   whit    "2layer" "blur"  ) )

(define null      (Gauss         "imag"  image      "Lay"    blur    "xRad" 5 "yRad" 5 )   )

(define null      (InvertLay     "lay"   blur                               ) )

(define plasm     (CopyLayer     "imag"  image     "layer"   txtlay  "2layer" "plasm"  ) )

(define null      (LayerFill     "lay"   plasm     "Type"    2  ))   ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (Plasma        "imag"  image     "layer"   plasm   "seed turb" (rand 65535) 4  ) )

(define null      (bumpmap       "image" image     "layer"   plasm   "bump" blur  "azi elev depth amb"  135 45 4  0)) 

(define mask      (AddWhiteMask  "lay"   plasm                    ) ) 

(define null      (LayerActv     "imag"  image     "layer"    whit     ))


(define null      (SelectAll     "imag"  image           ))

(define null      (InvertLay     "lay"   whit                               ) )

(define null      (Copy2         "layer" whit       "2layer"  mask  ) ) 

(define null      (AnchrFloat    "imag"  image      ) ) 

(define null      (LayerVis      "layer" blur       "ON/Off"   0             ))

(define null      (LayerVis      "layer" whit       "ON/Off"   0             ))

(define null      (LayOffset     "layer" txtlay     "offx"    4       "offy" 4   ) )

(define null      (LayerOpac     "lay"   txtlay     "percnt"  60 ))

(define null      (SetColors     "for"  '(0 255 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill     "lay"   backlayer  "Type"   0  ))    ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


======================Perspective_Text===========================================




(define image     (newRGBimage     "width" 520       "height" 200 ) )

(define backlayer (NameBackLayer   "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors       "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill       "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (Text            "imag"  image      "layer"    backlayer "text" "Fencepost" "font" "Gill Sans Bold" 

                                    "size"  90         "xlt"      20        "ylt"  20  ))

(define null      (Cut2Clip        "imag"  image ))

(define fromClip  (PasteClip       "layer" backlayer                     ) )


(define Arrayxywh (GetxyWH         "draw"  fromClip                      ) )

(define LTx       ( + (vector-ref  Arrayxywh 0) 100     ))  

(define LTy       (    vector-ref  Arrayxywh 1)          )    

(define RTx       (+  (vector-ref  Arrayxywh 0)  -100 (vector-ref Arrayxywh 2)))

(define RTy       (    vector-ref  Arrayxywh 1)           )

(define LBx       (    vector-ref  Arrayxywh 0)          )

(define LBy       (+  (vector-ref  Arrayxywh 1)     (vector-ref Arrayxywh 3)))

(define RBx       (+  (vector-ref  Arrayxywh 0)     (vector-ref Arrayxywh 2)))

(define RBy       (+  (vector-ref  Arrayxywh 1)      (vector-ref Arrayxywh 3)))

(define null      (Perspect        "clip"  fromClip "LTx LTy RTx RTy LBx LBy RBx RBy LTx" LTy RTx RTy LBx LBy RBx RBy ) )

(define null      (AnchrFloat      "imag"  image      ) )   



======================3D_Perspective_Text========================================


(define image     (newRGBimage     "width" 520       "height" 200 ) )

(define backlayer (NameBackLayer   "imag"  image     "Laynam" "backlayer" ) )

(define null      (SetColors       "for"   '(0 0 0 ) "Back"   '(255 255 255) ) )

(define null      (LayerFill       "lay"   backlayer  "Type"   1  )) ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (Text            "imag"  image      "layer"    backlayer "text" "Fencepost" "font" "Gill Sans Bold" 

                                    "size"  90         "xlt"      20        "ylt"  20  ))

(define null      (Cut2Clip        "imag"  image ))

(define fromClip  (PasteClip       "layer" backlayer                     ) )


(define Arrayxywh (GetxyWH         "draw"  fromClip                      ) )

(define LTx       ( + (vector-ref  Arrayxywh 0) 100     ))  

(define LTy       (    vector-ref  Arrayxywh 1)          )    

(define RTx       (+  (vector-ref  Arrayxywh 0)  -100 (vector-ref Arrayxywh 2)))

(define RTy       (    vector-ref  Arrayxywh 1)           )

(define LBx       (    vector-ref  Arrayxywh 0)          )

(define LBy       (+  (vector-ref  Arrayxywh 1)     (vector-ref Arrayxywh 3)))

(define RBx       (+  (vector-ref  Arrayxywh 0)     (vector-ref Arrayxywh 2)))

(define RBy       (+  (vector-ref  Arrayxywh 1)      (vector-ref Arrayxywh 3)))

(define null      (Perspect        "clip"  fromClip "LTx LTy RTx RTy LBx LBy RBx RBy LTx" LTy RTx RTy LBx LBy RBx RBy ) )

(define null      (AnchrFloat      "imag"  image      ) )   


(define blur      (CopyLayer       "imag"  image      "layer"    backlayer  "2layer" "blur"  ) )

(define null      (Gauss           "imag"  image      "Lay"      blur    "xRad" 7 "yRad" 7 )   )

(define null      (InvertLay       "lay"   blur      ) )


(define trans     (CopyLayer       "imag"  image      "layer"    backlayer  "2layer"    "trans"  ) )

(define null      (AddAlpha        "layer" trans   )     )

(define null      (Color2Alph      "imag"  image      "layer"    trans  "color" '(255 255 255) ) )

(define ColorLay  (CopyLayer       "imag"  image      "layer"    trans  "2layer" "ColorLay"  ) )


(define null      (SelectColor     "layer" ColorLay   "color"  '(0 0 0 ) "thresshold" 10 ) )

(define null      (SetColors       "for" '(0 255 0)    "Back"   '(255 255 255) ) )

(define null      (BuckFill        "lay"   ColorLay   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot       "imag"  image     )   ) 


(define null      (bumpmap         "image" image      "layer"  ColorLay  "bump" blur  "azi elev depth amb"  133 24 5 0  ))


(define null      (LayerVis        "layer" blur       "ON/Off"  0             ))

(define null      (LayerVis        "layer" trans      "ON/Off"  0             ))

(define null      (LayerVis        "layer" backlayer  "ON/Off"  0             ))


(define top       (CopyLayer       "imag"  image      "layer"   ColorLay  "2layer" "top"  ) )

(define null      (MoveLayer       "Lay"   top        "offx"    0  "offy" -2 ) )





======================BEVEL_Text========================================


(define image     (newRGBimage   "width" 700       "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 ) "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer  "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (SetColors     "fore" '(255 0 0 ) "Back"    '(0 0 0) ) )

(define null      (ShapeGrad     "layer" backlayer  "x1 y1 x2 y2"  20 20 150 150 )  )

(define textlay   (mkTranslayer  "imag"  image      "fromlay" backlayer   "tolay" "textlay") )

(define null      (SetColors     "fore" '(0 0 0 )   "Back"    '(255 255 255) ) )

(define null      (LayerFill     "lay"   textlay    "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define txtfloat  (Text          "imag"  image     "layer"    backlayer "text" "BEVEL" "font" "Gill Sans Bold" 

                                  "size"  175       "xlt"      20        "ylt"  20  ))

(define null      (Cut2Clip      "imag"  image ))

(define fromClip  (PasteClip     "layer" textlay                     ) )

(define null      (AnchrFloat    "imag"  image      ) )  

(define null      (AddAlpha      "layer" textlay   )     )

(define null      (Color2Alph    "imag"  image      "layer"   textlay  "color" '(255 255 255) ) )

(define null      (SelectColor   "layer" textlay "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SetColors     "fore" '(255 255 255 ) "Back"    '(0 0 0) ) )

(define null      (ShapeGrad     "layer" textlay  "x1 y1 x2 y2"  10 10 20 20 )  )

(define null      (SelectNot     "imag"  image     )   ) 


======================MIRROR_Text========================================


(define image     (newRGBimage   "width" 600       "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer  "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define lay1      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "lay1"  ) ) 

(define txtfloat  (Text          "imag"  image     "layer"    backlayer "text" "MIRROR TEXT" "font" "Liberation Sans Bold" 

                                   "size"  75       "xlt"      20        "ylt"  20  ))

(define null      (Cut2Clip      "imag"  image ))

(define fromClip  (PasteClip     "layer" lay1                     ) )

(define null      (AnchrFloat    "imag"  image      ) ) 

(define null      (Color2Alph    "imag"  image      "layer"   lay1  "color" '(255 255 255) ) )

(define whit      (CopyLayer     "imag"  image      "layer"   lay1  "2layer" "whit"  ) )

(define null      (LayerUp       "imag"  image      "Laynam"  lay1 ) )

(define blk       (CopyLayer     "imag"  image      "layer"   whit  "2layer" "blk"  ) ) 

(define null      (LayerUp       "imag"  image      "Laynam"  whit ) )

(define null      (SelectColor   "layer" whit       "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image     "value"  2   )  )

(define null      (LayerActv     "imag"  image      "layer"   whit     ))

(define null      (BuckFill      "lay"   whit      "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (grow          "imag"  image     "value"  2   )  )

(define null      (LayerActv     "imag"  image      "layer"   blk     ))

(define null      (BuckFill      "lay"   blk      "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

(define whit      (MergeDwn      "imag"  image      "layT"    lay1      "layB"   whit  ) )

(define blk       (MergeDwn      "imag"  image      "layT"    whit      "layB"   blk  ) )

(define null      (SelectNot     "imag"  image     )   ) 

(define mirr      (CopyLayer     "imag"  image      "layer"   blk  "2layer" "mirr"  ) )

(define null      (FlipAround    "layer" mirr       "fliptype" 1 "axis"  180   ) ) ;HOR(0),VERT1) 

(define null      (MoveLayer     "Lay"   mirr        "offx"    0  "offy" 60 ) )

(define null      (SetColors     "fore" '(255 255 255 )  "Back"    '(0 0 0) ) )

(define null      (LinFG2Trans   "layer" mirr   "x1 y1 x2 y2"  280 200 280 0 ) )

(define null      (LayerUp       "imag"  image      "Laynam"  blk ) )

(define null      (Flatten       "image" image      )) 




======================PERSPECTIVE_CUTOUT_Text========================================

(define image     (newRGBimage   "width" 600         "height"  600 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define textlay   (texLayer      "imag" image        "TxtStr"  "test"  "Font size unit" "Sans Bold" 30 2 ))

;===========      offset                                   

(define null      (LayOffset     "layer" textlay     "offx"    200 "offy" 200   ) )

(define Arrayxywh (GetxyWH       "draw"  textlay ))

;===========      find            float dimensions                       

(define x         (vector-ref     Arrayxywh  0)) ; 200

(define y         (vector-ref     Arrayxywh  1))

(define w         (vector-ref     Arrayxywh  2)) ; 190

(define h         (vector-ref     Arrayxywh  3)) ; 100    1008/18 = 56

;===========      make lay1       same size                       

(define lay1      (mkTranslayer  "imag"  image       "fromlay" backlayer   "tolay" "Lay1") )

(define null      (LayerUp       "imag"  image       "Laynam"  textlay ) )

(define lay1      (MergeDwn       "imag"  image      "layT"   textlay      "layB"   lay1  ) )

(define Arrayxywh (GetxyWH       "draw"   lay1 ))

(define x         (vector-ref     Arrayxywh  0)) ; 200

(define y         (vector-ref     Arrayxywh  1))

(define w         (vector-ref     Arrayxywh  2)) ; 600

(define h         (vector-ref     Arrayxywh  3)) ; 600   

;===========      make lay2       white                       

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) ) 

(define null      (LayOffset     "layer" lay2        "offx"    -2 "offy" -2   ) )

(define null      (SelectColor   "layer" lay2        "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (BuckFill      "lay"   lay2        "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  ))

;===========      make lay1       shadow                        

(define null      (Gauss         "imag"  image       "Lay"    lay1    "xRad" 5 "yRad" 5 )   )

(define lay1      (MergeDwn      "imag"  image       "layT"   lay2      "layB"   lay1  ) )

;===========      add rect                                

(define null      (SelRect       "imag"  image       "x y w h mode" 100 100 400 400 0 )); ADD0,SUB1,REP2,INTE3

(define null      (Sel2path      "imag"  image        "lay"   lay1     ) ) 

(define activVect (vectorGet     "imag"  image         )  )

(define null      (strokvect     "lay"   lay1        "vect"   activVect))

;===========      add perspective                                

(define null      (Perspectscale "layer" lay1        "gl gr gt gb" .5  1 1 1 )) 

(define null      (AnchrFloat    "imag"  image                     ) ) 


======================WRAPPED_Text========================================



(define image     (newRGBimage   "width" 600         "height"  600 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define textlay   (texLayer      "imag" image        "TxtStr"  "test"  "Font size unit" "Sans Bold" 30 2 ))


(define vdata1    #( 41 238 96 182 115 139 306 206 372 58 395 24 469 202 500 227 531 252 278 285 230 374 180 310 ))

(define numb      (vector-length  vdata1) )

(define vect1     (Newvector     "imag"  image       "name" "vect1"  )  )

(define null      (array2vect    "vect"   vect1 "numb array close" numb vdata1 1 )  )

(define null      (vectorVis     "path"   vect1  "vis" 1  )  )


(define activVect (vectorGet     "imag"  image    )  )

(define strokArr  (GetVectstoks  "path"  activVect    ))

(define ptarray   (PathPts       "Vect"  activVect   "strokeid" (vector-ref strokArr 0)   )  )

                  (script-fu-sg-warp-text image textlay 0 activVect 0 60)



======================GRADIENT_OPTIONS========================================


;Select/gradient the selection

(gimp-context-set-background '(0   0 0  ))

(gimp-context-set-foreground '(255 255 255))

(define blend     0)   ;FG-BG-RGB(0), FG-BG-HSV(1), FG-TRANSP (2), CUSTOM(3) 

(define paint     0)   ;NORM0,DISS1,BEHIND2,MUL3),SCREEN4,OVERLAY5,DIFF6,ADD7,

                        ;SUB8,DARK9,LIGHT10,HUE11,SAT12,COL13,VAL14,DIV15,DODG16,BURN17,

                        ;HARD18,SOFT19,GRAIN-EXTRACT20,GRAIN-MERGE21,COLORERASE22,ERASE23,

                        ;REPLACE24,ANTI-ERASE25

(define grad      6)   ;LIN0,BILIN1,RAD2,SQUAR3,CONSYMM4,CONASYM5,BURST-ANG6,BURST-SPHER7,

                        ;BURST-DIMPLE8,SPIRAL-CLOCKW),SPIRAL-ANTICLO10)

(define opac      100) ;(0 <= opacity <= 100)

(define off       0  ) ;(offset >= 0)

(define repeat    0  ) ;REPEAT-NONE (0), REPEAT-SAWTOOTH (1), REPEAT-TRIANGULAR (2) }

(define revs      0)   ;

(define ssamp     0)   ;

(define depth     1 )  ;(1 <= max-depth <= 9)

(define thres     1 )  ;Supersampling threshold (0 <= threshold <= 4)

(define dith      0);

(define x1        20);

(define y1        20);

(define x2        0);

(define y2        0);

(gimp-blend (car backlayer) blend paint grad  opac  off repeat revs ssamp depth thres dith x1 y1 x2 y2)


percent=(1-linenumb/total)*100

linenumb=868 =linenumber

total=5510=totallines



======================PERSPECTIVE_TOOL========================================



(gimp-drawable-transform-perspective drawable         x0 y0 x1 y1 x2 y2 x3 y3 trans-dir interpol supersample recursion-level clip-result)

(gimp-drawable-transform-perspective-default drawable x0 y0 x1 y1 x2 y2 x3 y3 interpolate clip-result)

(gimp-perspective drawable interpolation              x0 y0 x1 y1 x2 y2 x3 y3)


trnsform



(define image     (newRGBimage   "width" 600         "height"  600 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========      add rect                                

(define null      (SelRect       "imag"  image       "x y w h mode" 100 100 400 400 0 )); ADD0,SUB1,REP2,INTE3

(define null      (Sel2path      "imag"  image        "lay"   backlayer     ) ) 

(define activVect (vectorGet     "imag"  image         )  )

(define null      (strokvect     "lay"   backlayer        "vect"   activVect))

;===========      add perspective                                

(define null      (CornerOffset  "layer" backlayer  "tlx tly blx bly trx try brx bry" 0 50 0 -20 0 0 0 0 )) 

(define null      (AnchrFloat    "imag"  image                     ) ) 




===============Grid_TOOL=====================================

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image        "lay"    backlayer "w dx dy xoff yoff"  1 35 35 8 8 ))



===============Wave_Tank_TOOL=====================================



(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )


(define null      (gimp-context-set-pattern "Slate"))

(define null      (LayerFill     "lay"   backlayer   "Type"    4  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image       "lay"    backlayer "w dx dy xoff yoff"  1 35 35 8 8 ))

                  (script-fu-wavetank  image backlayer 2 5 3 4 1 1 .01)


==================================================

(gimp-context-get-pattern)

(script-fu-wavetank image drawable xscal yscak mode numbfram displace highlit disMag)


(script-fu-register "script-fu-wavetank"

                    "Wave Tank..."

                    "Generates an animation as if the active layer were on the bottom of a ripple tank."

                    "Will Morrison"

                    "Will Morrison"

                    "2010"

                    "RGB*"

    SF-IMAGE "Image" 0

    SF-DRAWABLE "Active Layer" 0

;                    SF-ADJUSTMENT "Image X size" '(800 1 2048 1 50 0 1)

;     SF-ADJUSTMENT "Image Y size" '(600 1 2048 1 50 0 1)

    SF-ADJUSTMENT "Horizontal scale" '(2 0.1 16 0.1 1 1 0)

                    SF-ADJUSTMENT "Vertical scale" '(5 0.1 16 0.1 1 1 0)

    SF-OPTION "Blend Mode" '("Overlay" "Addition" "Screen" "Dodge")

                    SF-ADJUSTMENT "Number of frames" '(50 1 400 1 10 0 1)

    SF-TOGGLE "Use Displace Map" 0

    SF-TOGGLE "Use Highlights" 1

    SF-ADJUSTMENT "Displace strength" '(0.01 0 1 0.01 0.1 3 0)

)

(script-fu-menu-register "script-fu-wavetank"

                         "<Image>/Filters/Will's Script Pack")




=================RandPick===============================


 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(plug-in-randomize-pick 1 image backlayer 50 8 0 10)



Randomly interchange some pixels with neighbors

(plug-in-randomize-pick run-mode image drawable rndpercent repeat randomize seed)

=================Slur===============================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(plug-in-randomize-slur 1 image backlayer 85 9 0 10)



similar to melting)

(plug-in-randomize-slur run-mode image drawable rndm-pct rndm-rcount randomize seed)




===============plug-in-spread_TOOL=====================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (plug-in-spread 1 image backlayer 45 45)


======================================

(plug-in-spread run-mode image drawable spread-amount-x spread-amount-y)


==================engrave========================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (script-fu-lew-engrave image backlayer 0 5 1.9 0 0 1 3 0)


===================================

(script-fu-lew-engrave run-mode image drawable pre w gama hori typ v2 rad exit)



=================Oilify===============================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (plug-in-oilify 1 image backlayer 9 0) ; RGB (0), INTENSITY (1


=========================

(plug-in-oilify run-mode image drawable mask-size mode)

Algorithm {RGB (0), INTENSITY (1)


(plug-in-oilify-enhanced run-mode image drawable mode mask-size mask-size-map expo



================Pixelize===============================



(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (plug-in-pixelize2 1 image backlayer 10 10)




(plug-in-pixelize run-mode image drawable pixel-width)

(plug-in-pixelize2 run-mode image drawable pixel-width pixel-height)



================Emboss/Bumpmap===============================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (emboss        "imag"  image       "layer"  backlayer "azi elev depth embos" 30 45 20 0) )


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (emboss        "imag"  image       "layer"  backlayer "azi elev depth embos" 30 45 20 1) )





(plug-in-emboss run-mode image drawable azimuth elevation depth emboss)



=============map/displace=======================================

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image        "lay" backlayer "w dx dy xoff yoff"  1 8 8 4 4 ))

;                 (plug-in-grid 1 image backlayer 1 5 8 '(0 0 0) 255 1 5 8 '(0 0 0) 255 0 2 6 '(0 0 0) 255)


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 50 50 0 )); ADD0,SUB1,REP2,INTE3

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    lay1      "xRad" 35 "yRad" 35 )   )

(define null      (LayerActv     "imag"  image       "layer"  backlayer     ))

;(define null     (InvertLay     "lay"   lay1                ) )

(define null      (LayerVis      "layer" lay1   "ON/Off"  0             ))


;(define null      (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

;(define null      (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


                   (plug-in-displace 1 image backlayer 10 0 1 0 lay1 lay1 1); wrap,smear,black


==================================================



(plug-in-grid run-mode image drawable hwidth hspace hoffset hcolor hopacity vwidth vspace voffset vcolor vopacity iwidth ispace ioffset icolor iopacity)


=============map/warp=======================================


(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (grid          "imag"  image        "lay" backlayer "w dx dy xoff yoff"  1 8 8 4 4 ))


(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

(define null      (LayerFill     "lay"   lay1        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (SelRect       "imag"  image       "x y w h mode" 40 40 50 50 0 )); ADD0,SUB1,REP2,INTE3

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    lay1      "xRad" 35 "yRad" 35 )   )

(define null      (LayerActv     "imag"  image       "layer"  backlayer     ))

(define null      (InvertLay     "lay"   lay1                ) )

(define null      (LayerVis      "layer" lay1   "ON/Off"  0             ))


;(define null      (SetColors     "fore" '(128 128 128 )    "Back"    '(255 255 255) ) )

;(define null      (LayerFill     "lay"   lay1        "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(plug-in-warp 1 image backlayer 30 lay1 1 0 0 0 lay1 0 1 0 0 0 0 0)


(plug-in-warp run-mode image drawable amount warp-map iter dither angle wrap-type mag-map mag-use substeps grad-map grad-scale vector-map vector-scale vector-angle)




===================SMART_Remove_TOOL=====================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (AddEllipse    "imag"  image       "x y w h Rfeath" 50 80 70 50 10  )   ) 

                  (script-fu-smart-remove  image backlayer 10)


==============================

(script-fu-smart-remove run-mode image drawable radius)


=================MEASURE_TOOL================================================



=================SMUDGE_TOOL================================================

 

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Brushset      "BName" "Circle (11)"                )      ) 

(gimp-context-set-paint-method "gimp-smudge" )

(gimp-context-get-paint-method) ;


(define null      (SmudgeALine    "layer" backlayer   "x1 y1 x2 y2" 130 180  130 150 ) ) 


=========================

(gimp-smudge drawable pressure num-strokes strokes)

The pressure of the smudge strokes (0 <= pressure <= 100)

Number of stroke control points (count each coordinate as 2 points) (num-strokes >= 2)

Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }


(gimp-context-list-paint-methods)

(11 ("gimp-pencil" "gimp-paintbrush" "gimp-eraser" "gimp-airbrush" "gimp-ink" "gimp-clone" "gimp-heal" "gimp-perspective-clone" "gimp-convolve" "gimp-smudge" "gimp-dodge-burn"))



=================CLONE_TOOL================================================

 

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Brushset      "BName" "Circle (11)"                )      ) 


(define null      (CloneALine "layer" backlayer "Layfrom" backlayer "cx cy x1 y1 x2 y2" 55 160 100 130 150 130 ) ) 


===============================

55 160  100  130 150 130


(gimp-clone drawable src-drawable clone-type src-x src-y num-strokes strokes)

The type of clone { IMAGE-CLONE (0), PATTERN-CLONE (1) }

The x coordinate in the source image

The y coordinate in the source image

Number of stroke control points (count each coordinate as 2 points) (num-strokes >= 2)

Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }


(gimp-clone-default drawable num-strokes strokes)



================HEAL_TOOL===============================================



(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Brushset      "BName" "Circle (11)"                )      ) 


(define null      (HealALine "layer" backlayer "Layfrom" backlayer "cx cy x1 y1 x2 y2" 55 160 100 130 150 130 ) ) 


==========================

(gimp-heal drawable src-drawable src-x src-y num-strokes strokes)

The x coordinate in the source image

The y coordinate in the source image

Number of stroke control points (count each coordinate as 2 points) (num-strokes >= 2)

Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }


(gimp-heal-default drawable num-strokes strokes)




===============DODGE/BURN_TOOL=======================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Brushset      "BName" "Circle (11)"                )      ) 

(define null      (DoggburnLine "layer" backlayer  "burn exp mod x1 y1 x2 y2" 0 50 1 100 130 150 130 ) ) ;SHAD0 MID1 HI2

(define null      (DoggburnLine "layer" backlayer  "burn exp mod x1 y1 x2 y2" 1 100 1 100 150 150 150 ) ) ;SHAD0 MID1 HI2


=============================

(gimp-dodgeburn drawable exposure dodgeburn-type dodgeburn-mode num-strokes strokes)

The exposure of the strokes (0 <= exposure <= 100)

The type either dodge or burn { DODGE (0), BURN (1) }

The mode { SHADOWS (0), MIDTONES (1), HIGHLIGHTS (2) }

Number of stroke control points (count each coordinate as 2 points) (num-strokes >= 2)

Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }


(gimp-dodgeburn-default drawable num-strokes strokes)





=================PATTERN_INFO_LIST===============================

 



(gimp-context-get-pattern)                 ;("Burlwood")

(gimp-patterns-get-list "wood")            ;(5 ("Burlwood" "Wood" "Wood #1" "Wood #2" "Wood of some sort"))

(gimp-pattern-get-info "Burlwood")         ;(96 96 3) w h bpp

(gimp-context-set-pattern "Burlwood")


(gimp-patterns-get-list "")

(76 ("Clipboard" "0023 - www.pgd-design.com" "0026 - www.pgd-design.com" "0028 - www.pgd-design.com" "0030 - www.pgd-design.com" "0031 - www.pgd-design.com" "0042 - www.pgd-design.com" "0045 - www.pgd-design.com" "0048 - www.pgd-design.com" "0055 - www.pgd-design.com" "3D Green" "Amethyst" "Big Blue" "Blue Grid" "Blue Squares" "Blue Web" "Bricks" "Burlap" "Burlwood" "Chocolate Swirl" "Cork board" "Crack" "Craters" "Crinkled Paper" "Dried mud" "Electric Blue" "Fibers" "GIMP Pattern" "GIMP Pattern#1" "Granite #1" "Ice" "Java" "Leather" "Leopard" "Lightning" "Maple Leaves" "Marble #1" "Marble #2" "Marble #3" "Nops" "One Small Step..." "Paper" "Parque #1" "Parque #2" "Parque #3" "Pastel Stuff" "Pine" "Pine?" "Pink Marble" "Pool Bottom" "Qbert" "Rain" "recessed" "Red Cubes" "Rocks" "Sky" "Slate" "Small Squares" "Starfield" "Stone" "Stripes" "Stripes Fine" "Terra" "Tree Bark" "Walnut" "Warning!" "Wood" "Wood #1" "Wood #2" "Wood of some sort" "www.pgd-design.com - 0003" "www.pgd-design.com - 0007" "www.pgd-design.com - 0011" "www.pgd-design.com - 0016" "www.pgd-design.com - 0017" "www.pgd-design.com - 0018"))


(file-pat-save run-mode image drawable filename raw-filename description)

(gimp-patterns-get-list filter)

(gimp-context-get-pattern)

(gimp-context-set-pattern)

(file-pat-load run-mode filename raw-filename)

(gimp-pattern-get-info name)





=================PALETTE_EDITOR===============================

 


(gimp-context-get-palette)                   ;("Default")


(gimp-palette-entry-get-color "Default" 0)   ;((255 0 0))

(gimp-palette-entry-get-color "Default" 1)   ;((255 0 255))

(gimp-palette-entry-get-name  "Default" 0)   ;("Red")

(gimp-palette-get-columns     "Default")     ;(0)

(gimp-palette-get-background)                ;((255 255 255))

(gimp-palette-get-foreground)                ;((245 222 179))

(gimp-palette-get-info "Default")            ;(23)

(gimp-palette-is-editable  "Default")        ;(0)

(gimp-palettes-refresh)


(gimp-palette-duplicate      "Default")      ;("Default copy")

(gimp-palette-is-editable    "Default copy") ;(1)

(gimp-palette-rename         "Default copy" "AA")


(gimp-palette-entry-set-name "Default copy" 0 "11test")


(

new_gradient_str (python-fu-palette-to-gradient run-mode palette)

(gimp-palette-get-colors "Default")


23 (255 255 255) (229 229 229) (204 204 204) (178 178 178) (153 153 153) (127 127 127) (102 102 102) (76 76 76) (51 51 51) (25 25 25) (0 0 0) (130 127 0) (0 127 0) (0 127 127) (0 0 127) (127 0 127) (127 0 0) (255 255 0) (0 255 0) (0 255 255) (0 0 255) (255 0 255) (255 0 0) #( () () () () () () () () () () () () () () () () () () () () () () () ))




(gimp-palettes-popup palette-callback popup-title initial-palette)


(plug-in-palettemap run-mode image drawable) ;


(plug-in-smooth-palette run-mode image drawable width height ntries show-image)




================PALETTEMAP_2_GRADIENT=====================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

                  (gimp-context-get-palette)                   ;("Default")

                  (python-fu-palette-to-gradient 1 "Default")

                  (plug-in-palettemap 1 image backlayer)       ;Recolor the image using colors from the active palette


================COLOR_MAP=====================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (IndexColor    "image" image       "NumCol"   5  ) )

                  (gimp-image-get-colormap image)   ;#( 27 21 15 116 83 61 168 150 134 236 150 65 245 237 224 ))




===============COLOR_MAP_SWITCH================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (IndexColor    "image" image     "NumCol"   4  ) )


(define colormap     (car ( cdr (gimp-image-get-colormap image))) )

;(12 #( 28 21 15 115 83 61 233 152 70 225 215 202 ))

(define Numcolmap (car (gimp-image-get-colormap image) ) ); 12


(define null      (RGBColor      "image" image        ) )

(define null      (gimp-context-get-palette)) ;("Default")

(define null      (plug-in-palettemap 1 image backlayer) )  ;Recolor the image using colors from the active palette

(define null      (IndexColor    "image" image       "NumCol"   4  ) )

(define null      (gimp-image-get-colormap image) );(12 #( 127 0 127 51 51 51 255 0 255 178 178 178 ))


(define null      (gimp-image-set-colormap image Numcolmap colormap))

(define null      (RGBColor       "image"  image        ) )



=====================================


(define null      (plug-in-colormap-remap 1 image backlayer Numcolmap colormap) )


==============


(gimp-image-get-colormap image)

(gimp-image-set-colormap image num-bytes colormap)

(plug-in-palettemap 1 image backlayer) ;Recolor the image using colors from the active palette


(plug-in-colormap-remap run-mode image drawable num-colors map)






=================CREATE_PALETTE_AND_REMAP=================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (IndexColor    "image" image     "NumCol"   5  ) )

                  (gimp-image-get-colormap image)                     ;(12 #( 28 21 15 115 83 61 233 152 70 225 215 202 ))


(gimp-palette-new "tiger4")

(gimp-palette-add-entry "tiger4" "black" '(0 0 0 ))

(gimp-palette-add-entry "tiger4" "brown" '(115 83 61 ))

(gimp-palette-add-entry "tiger4" "biege" '(225 215 202 ))

(gimp-palette-add-entry "tiger4" "green" '(0 152 70 ))

(gimp-palette-add-entry "tiger4" "white" '(255 255 255 ))

(gimp-palettes-refresh)

(gimp-context-set-palette "tiger4")


(define null      (RGBColor      "image" image        ) )

                  (plug-in-palettemap 1 image backlayer)                    ;Recolor the image using colors from the active palette




===========================================


(gimp-palette-add-entry "tiger4" "black" '(0 0 0 ))


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(plug-in-smooth-palette 1 image backlayer 248 318 4 1)


=================COLORMAP_SET================================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (IndexColor    "image" image       "NumCol"   22  ) )



(script-fu-set-cmap image backlayer "Browns And Yellows")

(gimp-context-get-palette)  ;("Browns And Yellows")




=======================PALETTE_SORT==========================================

(plug-in-smooth-palette run-mode image drawable width height ntries show-image) ;Derive a smooth color palette from the image

(python-fu-palette-sort run-mode palette model channel ascending)

(python-fu-palette-sort 1 "tiger4" "RGB" "Blue" 1)

(python-fu-palette-sort 1 "tiger4" "RGB" "Red" 1)

(python-fu-palette-sort 1 "tiger4" "RGB" "Green" 1)


=========================


(python-fu-palette-sort 1 "Grayss" "RGB" "Red" 1)

(python-fu-palette-sort 1 "AA" "RGB" "Red" 1)

(python-fu-palette-sort 1 "AA" "RGB" "Green" 1)




(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (ToGray        "image" image        ) )

                  (python-fu-palette-sort 1 "tiger4" "RGB" "Gray" 1)

                  (plug-in-palettemap 1 image backlayer)


                  (gimp-palette-entry-set-color "tiger4" 0 color)

(define color     '(0 0 0 )) 

(define null      (SetColors     "fore"'(255 255 255)"Back" '(0 0 0) ) )


colormap


(plug-in-smooth-palette 1 image backlayer 248 318 4 0)



=================================================================


(plug-in-smooth-palette run-mode image drawable width height ntries show-image) ; (23 53)


=================================================================




================Image_2_Gradient=====================================


================Image_2_Gradient=====================================



(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(define out1      (plug-in-smooth-palette 1 image backlayer 100 100 4 1) )

(define image2    ( car out1 ))

(define lay2      (car( cdr out1 )))


                  (script-fu-gradient-from-image  image backlayer 4 0 "tiger" 0)


                  (gimp-context-get-palette)  ;("Default")


(gimp-palette-get-colors "Default")

(23 (255 255 255) (229 229 229) (204 204 204) (178 178 178) (153 153 153) (127 127 127) (102 102 102) (76 76 76) (51 51 51) (25 25 25) (0 0 0) (130 127 0) (0 127 0) (0 127 127) (0 0 127) (127 0 127) (127 0 0) (255 255 0) (0 255 0) (0 255 255) (0 0 255) (255 0 255) (255 0 0) #( () () () () () () () () () () () () () () () () () () () () () () () ))


===============================


(plug-in-smooth-palette run-mode image drawable width height ntries show-image)


(script-fu-gradient-from-image run-mode image drawable numb smooth name trans)



================Gradient_SETUP=====================================


(number->string 16) =>  "16"

(string-append "foo" "bar" "foo" "bar" "foobar")


(define str2  "grad" )

(define i   0 )

(while (<= i 2)

(define st3 (string-append str2 (number->string i)))

(display st3 )

(set! i (+ i 1))

)



(define null      (SetColors     "fore" (list 255 255 255)"Back"    '(255 255 255) ) )


(gimp-gradient-new "thishere")                                   ; create new gradient

(gimp-gradient-is-editable "thishere")                           ; 1

(gimp-gradient-get-number-of-segments "thishere")                ;1

(gimp-gradient-segment-get-coloring-type "thishere" 0)           ;(0)  RGB (0), HSV-CClockWise (1),HSV-ClockWise (2) }

(define segment 0)

(gimp-gradient-segment-get-blending-function "thishere" segment) ;(0) LIN(0),CURV(1),SINE(2),SPHERE+(3), SPHERE-(4)

(gimp-gradient-segment-get-left-color "thishere" 0)              ;((0 0 0) 100)

(gimp-gradient-segment-get-middle-pos "thishere" 0)              ; (0.5)

(gimp-gradient-segment-get-right-color "thishere" 0)             ;((255 255 255) 100)  Default Black to white

(define name "thishere")

(define start-segment 0)

(define end-segment 1)

(define split-parts 3)

(gimp-gradient-segment-range-split-uniform name start-segment end-segment split-parts) ; now three segments

(gimp-gradient-get-number-of-segments "thishere") ;(3)

(gimp-gradient-segment-get-right-color "thishere" 0)  ;((85 85 85) 100)  

(gimp-gradient-segment-get-right-pos "thishere" 0) ;(0.3333333333)

(gimp-gradient-segment-set-middle-pos "thishere" 0 .06)

(gimp-gradient-segment-set-right-pos "thishere" 0 .133) 

(define color    '(0 255 0  ))

(define opacity  100)

(gimp-gradient-segment-set-right-color "thishere" 0 color opacity)

(gimp-gradient-segment-set-left-color "thishere"  1 color opacity)

(gimp-gradient-segment-set-right-pos "thishere" 0 .133) 



(gimp-gradient-delete name)



================THERMAL_Gradient=====================================


(define gradname "t2" )

(define nubseg 2 )

(gimp-gradient-new gradname )  

(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  ))


(gimp-gradient-segment-set-left-color  gradname 0 '(0   0 255) 100)

(gimp-gradient-segment-set-right-color gradname 0 '(255 0   0) 100)


(gimp-gradient-segment-set-left-color  gradname 1 '(255 0 0) 100)

(gimp-gradient-segment-set-right-color gradname 1 '(255   255 0) 100)



2,5  2.2

(gimp-gradient-segment-get-left-pos gradname 1) ;.5


================THERMAL_Gradient_CREATE=====================================



/* color_map file created by GIMP */

/* http://www.gimp.org/           */

color_map {

[0.000000 color rgbt <0.000000, 0.000000, 1.000000, 0.000000>]

[0.158974 color rgbt <0.364706, 0.000000, 0.500000, 0.000000>]

[0.292308 color rgbt <0.729412, 0.000000, 0.000000, 0.000000>]

[0.292308 color rgbt <0.729412, 0.000000, 0.000000, 0.000000>]

[0.497436 color rgbt <0.864706, 0.272549, 0.098039, 0.000000>]

[0.651282 color rgbt <1.000000, 0.545098, 0.196078, 0.000000>]

[0.651282 color rgbt <1.000000, 0.545098, 0.196078, 0.000000>]

[0.779487 color rgbt <0.986274, 0.741176, 0.135294, 0.000000>]

[0.879320 color rgbt <0.972549, 0.937255, 0.074510, 0.000000>]

[0.879320 color rgbt <0.972549, 0.937255, 0.074510, 0.000000>]

[0.948247 color rgbt <0.974510, 0.952941, 0.452941, 0.000000>]

[1.000000 color rgbt <0.976471, 0.968627, 0.831373, 0.000000>]

} /* color_map */


0           0   0   255

0.292308    186 0   0

0.651282    255 139 50 

0.879320    248 239 19

1.000000    249 246 212

r y y g g c c b b m m r



(gimp-gradient-segment-set-left-color name segment)


(define gradname "four3D" )

(define nubseg 4 )

(gimp-gradient-new gradname )  

(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  ))


(gimp-gradient-segment-set-left-color  gradname 0 '(0   0   255) 100)

(gimp-gradient-segment-set-right-color gradname 0 '(186 0 0)     100)

(gimp-gradient-segment-set-middle-pos  gradname 0  .16)

(gimp-gradient-segment-set-right-pos   gradname 0   .29)


(gimp-gradient-segment-set-left-pos    gradname 1   .29)

(gimp-gradient-segment-set-left-color  gradname 1 '(186 0 0)       100)

(gimp-gradient-segment-set-right-color gradname 1 '(255 139 50)     100)

(gimp-gradient-segment-set-middle-pos  gradname 1  .49)

(gimp-gradient-segment-set-right-pos   gradname 1   .65)


(gimp-gradient-segment-set-left-pos    gradname 2   .65)

(gimp-gradient-segment-set-left-color  gradname 2 '(255 139 50)      100)

(gimp-gradient-segment-set-right-color gradname 2 '(248 239 19 )    100)

(gimp-gradient-segment-set-middle-pos  gradname 2  .78)

(gimp-gradient-segment-set-right-pos   gradname 2   .88)


(gimp-gradient-segment-set-left-pos    gradname 3   .88)

(gimp-gradient-segment-set-left-color  gradname 3 '(248 239 19 )      100)

(gimp-gradient-segment-set-right-color gradname 3 '(249 246 212)    100)

(gimp-gradient-segment-set-middle-pos  gradname 3  .94)

(gimp-gradient-segment-set-right-pos   gradname 3   1.0)


(gimp-gradient-delete gradname)


================RAINBOW_Gradient_CREATE=====================================


 

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 




(define gradname "huetest" )

(define nubseg 4 )

(gimp-gradient-new gradname ) 


(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  )) 


(define COL0      '(255     0   0)    ) 

(define COL1      '(255   255   0)    )

(define COL2      '(0     255   0)    )

(define COL3      '(0     255   255)  )

(define COL4      '(0     0     255)  )


(gimp-gradient-segment-set-left-color  gradname 0 COL0    100)

(gimp-gradient-segment-set-right-color gradname 0 COL1    100)


(gimp-gradient-segment-set-left-color  gradname 1 COL1    100)

(gimp-gradient-segment-set-right-color gradname 1 COL2    100)


(gimp-gradient-segment-set-left-color  gradname 2 COL2    100)

(gimp-gradient-segment-set-right-color gradname 2 COL3    100)


(gimp-gradient-segment-set-left-color  gradname 3 COL3    100)

(gimp-gradient-segment-set-right-color gradname 3 COL4    100)



(define null      (LinCustmGrad  "layer" backlayer     "x1 y1 x2 y2"  0 200 300 200 )  )



(gimp-gradient-delete gradname)


 



(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 



(define gradname "huetest2" )

(define nubseg 4 )

(gimp-gradient-new gradname ) 


(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  )) 


(define COL0      '(255     0   0)    ) 

(define COL1      '(255     0   255)    )

(define COL2      '(0       0   255)    )

(define COL3      '(0     255   255)  )

(define COL4      '(0     255   0)  )


(gimp-gradient-segment-set-left-color  gradname 0 COL0    100)

(gimp-gradient-segment-set-right-color gradname 0 COL1    100)


(gimp-gradient-segment-set-left-color  gradname 1 COL1    100)

(gimp-gradient-segment-set-right-color gradname 1 COL2    100)


(gimp-gradient-segment-set-left-color  gradname 2 COL2    100)

(gimp-gradient-segment-set-right-color gradname 2 COL3    100)


(gimp-gradient-segment-set-left-color  gradname 3 COL3    100)

(gimp-gradient-segment-set-right-color gradname 3 COL4    100)



(define null      (LinCustmGrad  "layer" backlayer     "x1 y1 x2 y2"  0 200 300 200 )  )



(gimp-gradient-delete gradname)


 

(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 




(define gradname "huetest3" )

(define nubseg 4 )

(gimp-gradient-new gradname ) 


(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  )) 


(define COL0      '(0     255   0)    ) 

(define COL1      '(255   255   0)    )

(define COL2      '(255   0     0)    )

(define COL3      '(255   0     255)  )

(define COL4      '(0     0     255)  )


(gimp-gradient-segment-set-left-color  gradname 0 COL0    100)

(gimp-gradient-segment-set-right-color gradname 0 COL1    100)


(gimp-gradient-segment-set-left-color  gradname 1 COL1    100)

(gimp-gradient-segment-set-right-color gradname 1 COL2    100)


(gimp-gradient-segment-set-left-color  gradname 2 COL2    100)

(gimp-gradient-segment-set-right-color gradname 2 COL3    100)


(gimp-gradient-segment-set-left-color  gradname 3 COL3    100)

(gimp-gradient-segment-set-right-color gradname 3 COL4    100)



(define null      (LinCustmGrad  "layer" backlayer     "x1 y1 x2 y2"  0 200 300 200 )  )



(gimp-gradient-delete gradname)




==============Gradients===============================



(define image     (newRGBimage   "width" 300         "height"  250 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 




(define gradname "huetest" )

(define nubseg 4 )

(gimp-gradient-new gradname ) 


(gimp-gradient-segment-range-split-uniform gradname 0 1 nubseg) ;

(define null      (SetGrad       "Name"  gradname  )) 



(define COL0      (vector->list (vector  (random 255) (random 255) (random 255)) )  ) 

(define COL1      (vector->list (vector  (random 255) (random 255) (random 255)) )  ) 

(define COL2      (vector->list (vector  (random 255) (random 255) (random 255)) )  ) 

(define COL3      (vector->list (vector  (random 255) (random 255) (random 255)) )  ) 

(gimp-gradient-segment-set-left-color  gradname 0 COL0    100)

(gimp-gradient-segment-set-right-color gradname 0 COL1    100)

(gimp-gradient-segment-set-left-color  gradname 1 COL1    100)

(gimp-gradient-segment-set-right-color gradname 1 COL2    100)

(gimp-gradient-segment-set-left-color  gradname 2 COL2    100)

(gimp-gradient-segment-set-right-color gradname 2 COL3    100)

(gimp-gradient-segment-set-left-color  gradname 3 COL3    100)

(gimp-gradient-segment-set-right-color gradname 3 COL4    100)

(define null      (LinCustmGrad  "layer" backlayer     "x1 y1 x2 y2"  0 200 300 200 )  )


(define sp "->" )

(define hue1 95)

(define hue2 180)

(display "\n")

hue1 sp hue2 COL0 COL1 COL2 COL3 





#t-17"->"25(211 56 9)(230 107 151)(74 147 232)(71 136 65)

#t95"->"180(211 56 9)(230 107 151)(74 147 232)(71 136 65)

#t23"->"70(224 139 99)(23 241 101)(5 196 156)(148 16 179)

#t158"->"107(224 139 99)(23 241 101)(5 196 156)(148 16 179)

#t32"->"59(20 178 59)(87 30 221)(32 8 52)(197 100 99)

#t-60"->"-27(20 178 59)(87 30 221)(32 8 52)(197 100 99)

#t143"->"178(96 8 187)(200 214 111)(37 247 43)(138 52 194)

#t131"->"162(164 55 202)(128 195 182)(19 209 124)(58 177 21)

#t143"->"169(212 90 130)(227 139 102)(172 81 30)(221 92 25)

#t72"->"129(212 90 130)(227 139 102)(172 81 30)(221 92 25)

#t-180"->"-141(212 90 130)(227 139 102)(172 81 30)(221 92 25)

#t-111"->"-38(26 148 99)(15 170 147)(55 193 124)(91 36 223)

#t-131"->"-111(26 148 99)(15 170 147)(55 193 124)(91 36 223)

#t74"->"101(180 8 27)(38 227 64)(124 222 153)(185 195 89)

#t-131"->"-117(249 158 229)(235 18 234)(208 90 225)(190 176 247)

#t-56"->"-32(224 224 227)(133 91 91)(184 218 13)(182 29 123)

#t-180"->"-137(224 224 227)(133 91 91)(184 218 13)(182 29 123)

#t-147"->"-119(171 135 99)(186 182 125)(168 246 123)(198 35 182)

#t-180"->"-156(171 135 99)(186 182 125)(168 246 123)(198 35 182)

#t-15"->"27(164 90 14)(53 201 237)(14 74 145)(84 58 236)

#t-180"->"-113(62 57 117)(248 16 13)(136 50 67)(106 65 189)

#t-19"->"7(168 47 192)(234 121 252)(91 216 227)(185 127 137)

#t-131"->"-95(168 47 192)(234 121 252)(91 216 227)(185 127 137)

#t-15"->"13(168 47 192)(234 121 252)(91 216 227)(185 127 137)

#t32"->"52(168 47 192)(234 121 252)(91 216 227)(185 127 137)



(gimp-hue-saturation backlayer 0 hue2 0 0) 

(gimp-hue-saturation backlayer 0 hue1 0 0) 





hue1 sp hue2 COL0 COL1 COL2 COL3





(gimp-gradient-delete gradname)



================Grow_Shrink_to_Gradient=============================

 

;===========       Tiger               

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

;===========       fill all         nonblack  with white             

(define null      (SelectColor     "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SelectInvert    "image" image ) )

(define null      (BuckFill        "lay"   backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone      "image" image       )) 

;===========       select black                     

(define null      (SelectColor     "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

;===========       grow shrink                     

(define null      (grow            "imag"  image       "value"  3   )  )

(define null      (shrink          "imag"  image       "value"  3   )  )

;===========       fill with red                     

(define null      (SetColors       "for" '(128 0 0 )   "Back"   '(255 255 255) ) )

(define null      (BuckFill        "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

;===========       shrink color                      

(define null      (shrink          "imag"  image       "value"  2   )  )

(define null      (SetColors       "for" '(255 32 32 ) "Back"   '(255 255 255) ) )

(define null      (BuckFill        "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

;===========       shrink color                       

(define null      (shrink          "imag"  image       "value"  2   )  )

(define null      (SetColors       "for" '(255 128 128 ) "Back"   '(255 255 255) ) )

(define null      (BuckFill        "lay"   backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone      "image" image       ))


==============SHAPE_GRADIENT===================================================== 

 


;===========       Tiger               

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (SetColors     "for" '(0 0 0 )   "Back"   '(255 255 255) ) )

;===========       fill all       nonblack  with white             

(define null      (SelectColor   "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (SelectInvert  "image" image ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNone    "image" image       )) 

;===========       select black                     

(define null      (SelectColor   "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

;===========       grow shrink                    

(define null      (grow          "imag"  image       "value"  3   )  )

(define null      (shrink        "imag"  image       "value"  3   )  )

;===========       fill with      black                     

(define null      (SetColors     "for" '(0 0 0 )   "Back"   '(255 255 255) ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNone    "image" image       )) 

;===========       fill black     with   gradent                    

(define null      (SelectColor   "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (ShapeGrad     "layer" backlayer   "x1 y1 x2 y2"  20 20 150 150 )  )

(define null      (Levels        "layer" backlayer   "lowin"  132         "hiin"   255  "gamma" 1 "loout" 0 "hout" 255 ))  

(define null      (InvertLay     "lay"   backlayer                ) )

(define null      (SetColors     "for" '(50 50 255 )   "Back"   '(60 255 255) ) )

(define null      (SetGrad       "Name"  "FG to BG (RGB)"   ))


(define null      (gradMap       "imag"  image       "layer"  backlayer   )  ) 

(define null      (SelectNone    "image" image       )) 






==============Rolling_Gradient_MAP===============================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Desat         "layer" backlayer                 ))


(define str1      "frame " )

(define str2      " (100ms)" )

(define i         0 )

(while            (< i 8)

(define st3       (string-append str1 (number->string i) str2 ))

;(display         st3 )

(define fram1     (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" st3  ) ) 

(define null      (PhasGrad      "gname" "gradphase" "phase"   ( * .785 i) )  )

(define null      (gradMap       "imag"  image       "layer"   fram1   )  )

(define null      (deletGrad     "gname" "gradphase"  )  ) 

(set! i           (+ i 1))

)


(define null      (LayRemov      "imag"  image       "layer"   backlayer        )) 



==============Rolling_Gradient_PLAYBACK==============================




=================Moving-Sine-Gradients===============================

;===========      new image                                   

(define image     (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========      noise                                   

(define null      (NoiseSolid    "imag"  image       "layer"  backlayer "tile"   1 "turb" 0 "detail" 15 "radx" 8 "rady" 8) )

(define null      (Levels        "layer" backlayer   "lowin"  76         "hiin"   189  "gamma" 1 "loout" 0 "hout" 255 ))  



(define str1      "frame " )

(define str2      " (100ms)" )

(define i         0 )

(while            (< i 8)

(define st3       (string-append str1 (number->string i) str2 ))

;(display         st3 )

(define fram1     (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" st3  ) ) 

(define null      (PhasGrad      "gname" "gradphase" "phase"   ( * .785 i) )  )

(define null      (gradMap       "imag"  image       "layer"   fram1   )  ) 

(define null      (deletGrad     "gname" "gradphase"  )  )

(set! i           (+ i 1))

)


(define null      (LayRemov      "imag"  image       "layer"   backlayer        ))



================================



(define null      (SetGrad       "Name"  "gradphase"  ))

(define null      (deletGrad     "gname" "gradphase"  )  )



=================Using_Phase-Gradients===============================


(define image     (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (AddEllipse    "imag"  image       "x y w h Rfeath" 50 50 70 70 50  )   ) 

(define null      (BuckFill      "lay"   backlayer   "fill"   0  )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    backlayer    "xRad" 35 "yRad" 35 )   )


(define str1      "frame " )

(define str2      " (100ms)" )

(define i         0 )

(while            (< i 8)

(define st3       (string-append str1 (number->string i) str2 ))

;(display         st3 )

(define fram1     (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" st3  ) ) 

(define null      (PhasGrad      "gname" "gradphase" "phase"   ( * .785 i) )  )

(define null      (gradMap       "imag"  image       "layer"   fram1   )  )

(define null      (deletGrad     "gname" "gradphase"  )  ) 

(set! i           (+ i 1))

)


(define null      (LayRemov      "imag"  image       "layer"   backlayer        ))





================Color_Map_With_Gradient=============================


 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define lay1      (mkTranslayer    "imag"  image     "fromlay"  backlayer   "tolay" "Lay2") )

(define null      (LayerActv       "imag"  image     "layer"    backlayer     ))

(define null      (Desat           "layer" backlayer   ))

(define null      (SetGrad         "Name"  "Full saturation spectrum CCW"  ))

(define null      (gradMap         "imag"  image     "layer"   backlayer   )  ) 



=================Using_COLOR_Phase-Gradients===============================


 


(define image     (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(define null      (AddEllipse    "imag"  image       "x y w h Rfeath" 50 50 70 70 50  )   ) 

(define null      (BuckFill      "lay"   backlayer   "fill"   0  )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    backlayer    "xRad" 35 "yRad" 35 )   )


(define str1      "frame " )

(define str2      " (100ms)" )

(define i         0 )

(while            (< i 32)

(define st3       (string-append str1 (number->string i) str2 ))

;(display         st3 )

(define fram1     (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" st3  ) ) 

(define null      (PhasGradN     "gname" "gradphase" "phase"   ( * (/ 6.28318 32) i)   "nubseg" 32 )  )

(define null      (gradMap       "imag"  image       "layer"   fram1   )  ) 

(define null      (SetGrad       "Name"  "Full saturation spectrum CCW"  ))

(define null      (gradMap       "imag"  image       "layer"   fram1   )  ) 

(define null      (deletGrad     "gname" "gradphase"  )  )

(set! i           (+ i 1))

)


(define null      (LayRemov      "imag"  image       "layer"   backlayer        ))



=================Make_Rainbow_Gradient_Movie===============================



;Need to convert gif to RGB

(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/Bob_Dylan.jpg" )

(define image     (Load-jpg      "path"  fpath       "name"    "Input.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (RGBColor      "image" image        ) )

;Set Gradient to rainbow

(define null      (SetGrad       "Name"  "Full saturation spectrum CCW"  ))

(define null      (gradMap       "imag"  image       "layer"   backlayer   )  ) 

;The hue can be rotated

(gimp-hue-saturation backlayer 0    -180  0 0)      ; range 0 all 1 red,+/-180 hue +/-100 else

(define name      (car(gimp-context-get-gradient)))

;Create 20 more rotation

(define lastlay backlayer )

(define i   1 )

(while (<= i 20)

(define num       (string-append "00" (number->string i))  )  

(define len       (string-length num) ) 

(define numb      (substring num  (- len 3) len ) )

(define lname     (string-append "lay" numb  ))     

(define newlay    (CopyLayer     "imag"  image       "layer"   lastlay  "2layer" lname  ) )

(gimp-hue-saturation newlay 0 10  0 0)      ; range 0 all 1 red,+/-180 hue +/-100 else

(set! lastlay newlay )

(set! i (+ i 1))

)

;Now play as a movie

(plug-in-animationplay 1 image backlayer)

;stop movie to continue



======================SAVE_ANIMATE_GIFF_DETAILS===========================



==============CREATE_AND_SAVE_GIF_MOVIE==========================




(define image     (newRGBimage   "width" 200         "height"   100 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

;create and name layers as frames 

(define frame1    (NameBackLayer "image" image       "Layname" "frame 1 (100ms)" ) )

(define null      (LayerFill     "lay"   frame1      "Type"     2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define textlay   (texLayer      "imag"  image       "TxtStr"  "test"  "Font size unit" "Sans Bold" 30 2 ))

(define null      (SelectColor   "layer" textlay     "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (BuckFill      "lay"   frame1      "fill"     0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (LayerVis      "layer" textlay      "ON/Off"  0             ))

(define null      (SelectNot     "imag"  image                     )) 

(define frame2    (CopyLayer     "imag"  image       "layer"   frame1  "2layer" "frame 2 (200ms)"  ) ) 

(define frame3    (CopyLayer     "imag"  image       "layer"   frame1  "2layer" "frame 3 (100ms)"  ) )

(define null      (LayerFill     "lay"   frame2      "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define null      (ToBW          "image" image       "dither"  0  ) ) ; NONE0,FS-DITH1,FSLOWBLEED2,FIXED3

(define null      (LayRemov      "imag"  image       "layer"   textlay        )) 

;save as gif movie  

(define fpath     "/Users/don_sauer/Downloads/u2.gif" )

(define null      (GiffOptim     "imag"  image       "layer"   frame1     ) )

(define null      (GiffSave      "imag"  image       "layer"   frame1    "fpath" fpath  "loop delayms" 1 100   ) )



==============LOAD_ANIMATE_GIFF===========================


;Load gif movie 

(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/tweety_e0.gif" )

(define image     (Load-gif      "path"  fpath       "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(plug-in-animationplay 1 image backlayer)

;Close amimation window to continue 

;save as gif movie  

(define fpath     "Users/don_sauer/Downloads/uw.gif" )

(define null      (GiffOptim     "imag"  image       "layer"   backlayer     ) )

(define null      (GiffSave      "imag"  image       "layer"   backlayer    "fpath" fpath  "loop delayms" 1 100   ) )






==============SNOWFLAKE=====================================================


(define image     (newRGBimage   "width" 600         "height"  600 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       select  rect                     

(define null      (SelectAddRect "image" image       "x_upl"    300  "y_upl" 50  "w"  100  "h" 250 ))

(define null      (SetColors     "fore" '(177 24 255)"Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNot     "imag"  image                  )) 

;===========       rotate  rect   and cut                     

(define null      (SelectAddRect "image" image       "x_upl"    100  "y_upl" 50  "w"  100  "h" 500 ))

(define float     (Select2Float  "layer" backlayer                     ) )

(define null      (Copy2Clip     "float" float                         ) )

(define fromClip  (PasteClip     "layer" backlayer                     ) )

(define null      (TranslatFloat "imag"  image       "xlb" 300  "ylb" 50  "xrt" 400  "yrt" 550   ) )

(define null      (RotFloat      "imag"  image       "angle"    .523598     "clockw" 0) ) 

(define fromClip  (GetFloat "imag" image ) )

(define null      (AnchrFloat    "imag"  image                     ) )  

;===========       rotate  rect   and cut                     

(define null      (SelectAddRect "image" image       "x_upl"    100  "y_upl" 300  "w"  400  "h" 100 ))

(define float     (Select2Float  "layer" backlayer                     ) )

(define null      (Copy2Clip     "float" float                         ) )

(define fromClip  (PasteClip     "layer" backlayer                     ) )

(define null      (TranslatFloat "imag"  image       "xlb" 100  "ylb" -10  "xrt" 500  "yrt" 120   ) )

(define null      (RotFloat      "imag"  image       "angle"    .523598     "clockw" 0) ) 

(define fromClip  (GetFloat      "imag" image ) )

(define null      (AnchrFloat    "imag"  image                     ) )  

;===========       copy2 lay1                     

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) ) 

;===========       add cutouts                     

(define fpath     "/Users/don_sauer/Downloads/Applications/gimp_imageProcess/data/snowflake" )

(define lpath     (Loadvect      "imag" image         "path"  fpath    ) )

;===========       vectors 2 sel                     

(define activVect (vectorGet     "imag"  image    )  )

(define Vecname   (vectname      "imag"  image       "path" activVect   )  )

(define null      (Path2sel      "imag"  image       "pname"  Vecname "op alias feath rx ry" 0 0 1 1 1) );ADD0,SUB1,RE

;===========       cut out trans                     

(define null      (CutSelect     "layer" lay1  )) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Color2Alph    "imag"  image       "layer"   lay1  "color" '(255 255 255) ) )

;===========       mirror lay2    onto lay1                     

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) )

(define null      (FlipAround    "layer" lay1        "fliptype" 0 "axis"  500   ) ) ;HOR(0),VERT1) 

(define lay1      (MergeDwn      "imag"  image       "layT"    lay2      "layB"   lay1  ) )

;===========       find offsets   and adjust                   

(define null      (SelectColor   "layer" lay1        "color"   '(177 24 255 ) "thresshold" 100 ) )

(define float     (Select2Float  "layer" lay1                     ) )

(define Arrayxywh (GetxyWH       "draw"  float ))                 ;#( 232 129 136 158 )

(define null      (AnchrFloat    "imag"  image                     ) )  

(define null      (MoveLayer     "Lay"   lay1        "offx"    0  "offy" 13 ) )

;===========       mirror lay2    onto lay1  and adjust                   

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) )

(define null      (FlipAround    "layer" lay2        "fliptype" 1 "axis"  300   ) ) ;HOR(0),VERT1) 

(define null      (MoveLayer     "Lay"   lay2        "offx"    0  "offy" -13 ) )

(define lay1      (MergeDwn      "imag"  image       "layT"    lay2      "layB"   lay1  ) )

;===========       mirror 30deg   onto lay1                    

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) )

(define null      (RotLayer      "lay"   lay2   "angle"   1.047197     "clockw" 0) )  

(define lay1      (MergeDwn      "imag"  image       "layT"    lay2      "layB"   lay1  ) )

;===========       mirror -30deg   onto lay1                    

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) )

(define null      (RotLayer      "lay"   lay2        "angle"   -1.047197     "clockw" 0) )  

(define lay1      (MergeDwn      "imag"  image       "layT"    lay2      "layB"   lay1  ) )

;===========       create whit                    

(define whit      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "whit"  ) )

(define null      (LayerFill     "lay"   whit        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;===========       raise lay1                    

(define null      (LayerUp       "imag"  image       "Laynam"  lay1 ) )



===================Get_Pixels======================================




(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(gimp-drawable-get-pixel backlayer 73 61)    ;(3 #( 255 253 225 ))

(gimp-drawable-get-pixel backlayer 130 130)  ;(3 #( 220 95 3 ))


(gimp-drawable-set-pixel backlayer 3 3 3 #( 255 0 0 ))


(gimp-image-pick-color image backlayer 73 40 0 1 5) ;((244 175 83))



=======================


(gimp-image-pick-color image drawable x y sample-merged sample-average average-radius)

(gimp-drawable-get-pixel drawable x-coord y-coord)

(gimp-drawable-set-pixel drawable x-coord y-coord num-channels pixel)




================Color_Enhance=================================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (gimp-hue-saturation backlayer 0 -90 0 -70))

(define null      (plug-in-color-enhance 1 image backlayer))


=============================================


(gimp-hue-saturation drawable hue-range hue-offset lightness saturation)

(gimp-hue-saturation drawable hue-range hue-offset lightness saturation)

Range of affected hues { ALL-HUES (0), RED-HUES (1), YELLOW-HUES (2), GREEN-HUES (3), CYAN-HUES (4), BLUE-HUES (5), MAGENTA-HUES (6) }

Hue offset in degrees (-180 <= hue-offset <= 180)

Lightness modification (-100 <= lightness <= 100)

Saturation modification (-100 <= saturation <= 100)


==================Colorify===============================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (Desat         "layer" backlayer                 ))

(define null      (plug-in-colorify 1 image backlayer '(255 0 0 ) ))


============

(gimp-color-balance drawable transfer-mode preserve-lum cyan-red magenta-green yellow-blue)


=================Alpha_From_Color================================================

 


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(define null      (plug-in-colortoalpha    1 image backlayer '(0 0 0 )) )

(define null      (plug-in-threshold-alpha 1 image backlayer 100))



=========================


(gimp-palette-get-colors name)


(gimp-by-color-select-full drawable color threshold operation antialias feather feather-radius-x feather-radius-y sample-merged select-transparent select-criterion)

(plug-in-threshold-alpha run-mode image drawable threshold)



=================InvertBrightness===============================================

 

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(plug-in-vinvert 1 image backlayer)




==============CHANGE_COLOR==============================


USE Fuszzy Select then adjust hue



==============Color_BlackWhite===============================



(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath      "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

(define null      (Desat         "layer" backlayer                 ))

;USE BRUSH and EASER to COLOR A layer

(define lay1      (mkTranslayer  "imag"  image       "fromlay" backlayer   "tolay" "Lay1") )

(define null      (LayerMode     "lay"   lay1        "mode"   13 )) ;ADD7,SUB8,DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define null      (Brushset      "BName" "Circle (11)"                )      ) 

(define null      (SetColors     "fore"' (0 255 255)  "Back"    '(255 255 255) ) )

(define null      (PaintPt       "layer" lay1        "xpt"     82  "ypt"    106  ) ) 

(define null      (PaintPt       "layer" lay1        "xpt"     92  "ypt"    110  ) )

(define null      (PaintPt       "layer" lay1        "xpt"     89  "ypt"    104  ) ) 

;EACH COLOR Gets a new layer

(define lay2      (mkTranslayer  "imag"  image       "fromlay" backlayer   "tolay" "Lay2") )

(define null      (LayerMode     "lay"   lay2        "mode"   13 )) ;ADD7,SUB8,DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define null      (Brushset      "BName" "Circle (19)"                )      ) 

(define null      (SetColors     "fore"' (255 100 0)  "Back"    '(255 255 255) ) )

(define null      (PaintPt       "layer" lay2        "xpt"     130 "ypt"    130  ) )

(define null      (PaintPt       "layer" lay2        "xpt"     130 "ypt"    120  ) )

(define null      (PaintPt       "layer" lay2        "xpt"     130 "ypt"    110  ) )




=======================

(define fpath     "/Users/don_sauer/Downloads/Applications/gimp_imageProcess/pict/haircolor.gif" )

(define image     (Load-gif      "path"  fpath       "name"    "Tiger.jpg" ) )

(define null      (RGBColor      "image" image        ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )


(define lay1      (mkTranslayer  "imag"  image       "fromlay" backlayer   "tolay" "Lay1") )

(define null      (LayerMode     "lay"   lay1 "mode"   13 )) ;ADD7,SUB8,DK9,LI10,HUE11,SAT12,COL13,VAL14,DIV15

(define null      (SetColors     "fore"'(255 137 0)"Back"    '(255 255 255) ) )

(define null      (PaintPt       "layer" forscale    "xpt"     200  "ypt"    200  ) ) 


(define null      (SetColors     "fore"'(255 137 0)  "Back"    '(255 255 255) ) )





==============PAINT_BW_ACCESS_TO_COLOR====================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define top       (CopyLayer       "imag"  image     "layer"   backlayer  "2layer" "top"  ) ) 

(define mask      (AddWhiteMask    "lay"   top                    ) ) 

(define null      (Desat           "layer" top  ))

;BW Image with alpha mask is above the colored image

(define null      (Brushset        "BName" "Circle (19)"                )      ) 

(define null      (SetColors       "fore"' (0 00 0)  "Back"    '(255 255 255) ) )

;Painting alpha mask reveals color

(define null      (PaintALine      "layer" mask     "x1 y1 x2 y2" 82 145  200 90 ) ) 


===========================


(define frommask (gimp-layer-get-mask top))

(gimp-layer-get-edit-mask top)                ;  1 if esditable

(gimp-layer-set-edit-mask top mask)          ;  set mask to editable

(gimp-layer-set-show-mask top 0)

(gimp-drawable-is-layer mask)      ;0

(gimp-drawable-is-layer-mask mask) ;1

(gimp-layer-set-apply-mask top 1)

(gimp-layer-set-edit-mask top 0)

(gimp-layer-set-edit-mask top 1)

(gimp-layer-get-name mask) ;("top mask")


=====================PAINT_BRUSH_ACCESS_TO_IMAGE========================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define null      (Desat           "layer" backlayer  ))

;Add Semi-transparent white layer on top of BW Image

(define top       (CopyLayer       "imag"  image      "layer"   backlayer  "2layer" "top"  ) ) 

(define null      (LayerFill       "lay"   top        "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define mask      (AddWhiteMask    "lay"   top                    ) ) 

(define null      (LayerOpac       "lay"   top       "percnt"  90 ))

;Paint        happens on Mask    

(define null      (Brushset        "BName" "Pencil Sketch#1"                )      ) 

(define null      (SetColors       "fore"' (0 00 0)  "Back"    '(255 255 255) ) )

(define null      (PaintALine      "layer" mask     "x1 y1 x2 y2" 82 145  200 90 ) ) 




==============COPY_A_COLOR_TO_A_LAYER===============================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define backlayer (IndexColor      "image" image     "NumCol"   4  ) )

(define backlayer (RGBColor        "image" image        ) )

;Quantized image to 4 levels for color selection

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define null      (SelectColor     "layer" backlayer   "color" '(233 152 70) "thresshold" 40 ) )

;Copy selection to clipboard

(define float     (Select2Float    "layer" backlayer                     ) )

(define null      (Copy2Clip       "float" float                         ) )

;Make transparent layer to paste clipboard on

(define lay1      (mkTranslayer    "imag"  image     "fromlay"  backlayer   "tolay" "Lay1") )

(define fromClip  (PasteClip       "layer" lay1                     ) )

(define null      (AnchrFloat      "imag"  image      ) )  

;turn off other layer

(define null      (LayerVis        "layer" backlayer "ON/Off"   0             ))



==================DeCompose/Compose/HSV================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Open a Display showing the hue

(define Hicomp     (plug-in-decompose 1 image backlayer "Hue" 0) ) ;(14 15 16 -1)

(define Himag     (car  Hicomp ))  

(define null      (gimp-display-new Himag) )

;Open a Display showing the saturation

(define Sicomp     (plug-in-decompose 1 image backlayer "Saturation" 0) ) ;(14 15 16 -1)

(define Simag     (car  Sicomp ))  

(define null      (gimp-display-new Simag) )

;Open a Display showing the value

(define Vicomp     (plug-in-decompose 1 image backlayer "Value" 0) ) ;(14 15 16 -1)

(define Vimag     (car  Vicomp ))  

(define null      (gimp-display-new Vimag) )

;Open a Display showing the Image2 composed of H/S/V

(define image2    (car (plug-in-compose 1 Himag backlayer Simag Vimag Vimag "HSV") ))  

(define null      (gimp-display-new image2) )


============================

(plug-in-compose run-mode image1 drawable image2 image3 image4 compose-type)

"RGB", "RGBA", "HSV", "HSL", "CMY", "CMYK", "LAB", "YCbCr_ITU_R470", "YCbCr_ITU_R709", "YCbCr_ITU_R470_256", "YCbCr_ITU_R709_256"


==================DeCompose/Compose/RGB================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Open a Display showing the red

(define Ricomp    (plug-in-decompose 1 image backlayer "RED" 0) ) ;(14 15 16 -1)

(define Rimag     (car  Ricomp ))  

(define null      (gimp-display-new Rimag) )

;Open a Display showing the green

(define Gicomp    (plug-in-decompose 1 image backlayer "GREEN" 0) ) ;(14 15 16 -1)

(define Gimag     (car  Gicomp ))  

(define null      (gimp-display-new Gimag) )

;Open a Display showing the blur

(define Bicomp    (plug-in-decompose 1 image backlayer "BLUE" 0) ) ;(14 15 16 -1)

(define Bimag     (car  Bicomp ))  

(define null      (gimp-display-new Bimag) )

;Open a Display showing the Image2 composed of H/S/V

(define image2    (car (plug-in-compose 1 Rimag backlayer Gimag Bimag Bimag "RGB") ))  

(define null      (gimp-display-new image2) )


============================

(plug-in-compose run-mode image1 drawable image2 image3 image4 compose-type)

"RGB", "RGBA", "HSV", "HSL", "CMY", "CMYK", "LAB", "YCbCr_ITU_R470", "YCbCr_ITU_R709", "YCbCr_ITU_R470_256", "YCbCr_ITU_R709_256"





==================Image_SubWindow_Rotate======================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Cut away all but a subwindow

                   (gimp-image-resize image 100 100 -20 -50)

;Rotate in units of 90 degrees

              (gimp-image-rotate image 2)


===============================

(gimp-image-resize image new-width new-height offx offy)


(gimp-image-rotate image rotate-type)

Angle of rotation { ROTATE-90 (0), ROTATE-180 (1), ROTATE-270 (2) }



===================Resize/Remove/Flatten===============================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Copy to lay2, subwindow, and move

(define lay2      (CopyLayer     "imag"  image     "layer"   backlayer  "2layer" "lay2"  ) ) 

(define null      (gimp-layer-resize lay2 100 100 -20 -30) )

(define null      (LayOffset     "layer" lay2    "offx"    40 "offy" 40   ) )

;How to copy a layer then remove

(define lay3      (CopyLayer     "imag"  image     "layer"   lay2  "2layer" "lay3"  ) ) 

(define null      (gimp-image-remove-layer image lay3) )

;All back to one layer

(define lay4      (car (gimp-image-flatten image)))


========================================


(define lay3      (car (gimp-layer-new-from-visible image image "lay3") ))


(define null      (gimp-image-add-layer image2 lay3 -1))


========================================


(define image2    (newRGBimage   "width" 300         "height"  150 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlay2  (NameBackLayer "image" image2      "Layname" "backlay2" ) )

(define null      (LayerFill     "lay"   backlay2    "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 


(gimp-image-flatten image)

(gimp-layer-from-mask mask)

(gimp-layer-new-from-visible image dest-image name)

(gimp-layer-resize layer new-width new-height offx offy)

(gimp-image-remove-layer image layer)







==============Copy_to_a_transparent_Layer====================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Create new transparent layer

;===========       new colorlay    

(define colorlay  (CopyLayer     "imag"  image     "layer"   backlayer  "2layer" "colorlay"  ) )

(define null      (AddAlpha      "layer" colorlay                   )     )

(define null      (LayerFill     "lay"   colorlay  "Type"    3  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;copy a rectangle area from one layer into the second 

;===========       copy sel2      color  layer  

(define null      (SelectAddRect "image" image       "x_upl"    50  "y_upl" 30  "w"  50  "h" 50 ))

(define null      (Copy2         "layer" backlayer   "2layer"  colorlay  ) ) 

;anchor the float

(define null      (AnchrFloat    "imag"  image                     ) ) 

;===========       view both   

(define null      (LayerOpac     "lay"   backlayer   "percnt"  60 ))



============PASTE_INTO_LARGER_IMAGE======================================

 

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define Arrayxywh  (GetxyWH       "draw"  backlayer  ))

;find float dimensions                       

(define x          (vector-ref     Arrayxywh  0)) ; 0

(define y          (vector-ref     Arrayxywh  1)) 

(define w          (vector-ref     Arrayxywh  2)) ; 248

(define h          (vector-ref     Arrayxywh  3)) ; 318

;scale the image to 300 by 400

(define null      (ImagScale     "image" image        "w h inter" 300 400 0 ) )

;resize all of scaled image and paste back with offset

(define null      (SelectAll     "imag"  image                 )) 

(define null      (CutSelect     "layer" backlayer  )) 

(define fromClip  (PasteClip     "layer" backlayer                     ) )

(define null      (TranslatFloat "imag"  image       "xlb" 20  "ylb" 20  "xrt" w  "yrt" h   ) )

(define null      (AnchrFloat    "imag"  image                     ) ) 



(define null      (CropImag      "imag"  image       "x y w h" 0 0 200 300  ) )




============PASTE_INTO_ANOTHER_IMAGE======================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define Arrayxywh  (GetxyWH       "draw"  backlayer  ))

;find float dimensions                       

(define x          (vector-ref     Arrayxywh  0)) ; 0

(define y          (vector-ref     Arrayxywh  1)) 

(define w          (vector-ref     Arrayxywh  2)) ; 248

(define h          (vector-ref     Arrayxywh  3)) ; 318

;Create New image of 300 by 400

(define image2     (newRGBimage   "width" 300         "height"  400 ) )

(define null       (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer2 (NameBackLayer "image" image2       "Layname" "backlayer2" ) )

(define null       (LayerFill     "lay"   backlayer2   "Type"    2  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;select all and past into new image

(define null      (SelectAll     "imag"  image                 )) 

(define float     (Select2Float  "layer" backlayer                     ) )

(define float     (PasteClip     "layer" backlayer2                     ) )

(define null      (TranslatFloat "imag"  image2       "xlb" 20  "ylb" 20  "xrt" w  "yrt" h   ) )

(define null      (AnchrFloat    "imag"  image2  ))


=======

(gimp-image-set-filename image2 "secondimage")



(gimp-image-get-name image)

(gimp-image-set-colormap image num-bytes colormap)

(gimp-image-set-filename image filename)


============PASTE_INTO_ANOTHER_LAYER======================================

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg      "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

;Create New transparent layer

;===========       colorlay       

(define colorlay  (CopyLayer     "imag"  image     "layer"   backlayer  "2layer" "colorlay"  ) )

(define null      (AddAlpha      "layer" colorlay                   )     )

(define null      (LayerFill     "lay"   colorlay  "Type"    3  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

;Create paste a float will center the selection

(define null      (SelectAddRect "image" image       "x_upl"    50  "y_upl" 30  "w"  50  "h" 50 ))

(define float     (Select2Float  "layer" backlayer                     ) )

(define null      (Copy2Clip     "float" float                         ) )

(define fromClip  (PasteClip     "layer" colorlay                      ) )

(define null      (AnchrFloat    "imag"  image                         ) )  


==============PASTE_WITH_ZERO_OFFSET=====================================================


(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

;Create New transparent layer

(define lay1      (mkTranslayer    "imag"  image     "fromlay"  backlayer   "tolay" "Lay2") )

(define null      (LayerActv       "imag"  image     "layer"    backlayer     ))

;Create paste a float will center the selection   

(define null      (SelectAddRect   "image" image     "x_upl"    10  "y_upl" 10  "w"  100  "h" 100 ))

(define float     (Select2Float    "layer" backlayer                     ) )

(define null      (Copy2Clip       "float" float                         ) )

(define fromClip  (PasteClip       "layer" lay1                          ) )

;Findthe float’s offset       

(define Arrayxywh (GetxyWH         "draw"  fromClip                      ) ) ;( 74 109 100 100 )

                  (gimp-drawable-offsets   fromClip) ;       (74 109)

;offset the float by zero     

(define null      (LayOffset     "layer" fromClip    "offx"   0 "offy" 0   ) )

(define null      (AnchrFloat    "imag"  image                     ) )  


================================


(gimp-drawable-get-pixel lay1 25 25)      ; (4 #( 188 116 44 255 ))

(gimp-drawable-get-pixel backlayer 25 25) ;3 #( 253 228 208 ))


================Copy_Edit_Paste_to_Transparent=============================


;===========       tiger                       

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

;Create New transparent layer                     

(define lay1      (mkTranslayer    "imag"  image     "fromlay"  backlayer   "tolay" "Lay2") )

;Select Area                         

(define null      (LayerActv       "imag"  image     "layer"    backlayer     ))

(define null      (SelectAddRect   "image" image     "x_upl"    10  "y_upl" 10  "w"  50  "h" 50 ))

;Copy to Layer

(define null      (Copy2           "layer" backlayer "2layer"   lay1  ) ) 

;Translate and scale and anchor

(define null      (TranslatFloat   "imag"  image     "xlb" 20  "ylb" 20  "xrt" 179  "yrt" 178   ) )

(define null      (AnchrFloat      "imag"  image      ) )   

(define null      (LayerActv       "imag"  image     "layer"    backlayer     ))

;Select Area and Copy to Layer

(define null      (SelectAddRect   "image" image     "x_upl"    50  "y_upl" 50  "w"  150  "h" 150 ))

;Rotate and Translate and anchor

(define null      (Copy2           "layer" backlayer "2layer"   lay1  ) ) 

(define null      (TranslatFloat   "imag"  image     "xlb" 120  "ylb" 120  "xrt" 199  "yrt" 198   ) )

(define null      (RotFloat        "imag"  image     "angle"    .2     "clockw" 0) )   

(define null      (AnchrFloat      "imag"  image      ) )   


=================Perspective_To_Selection===============================

;===========       tiger                       

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

(define lay1      (mkTranslayer    "imag"  image     "fromlay"  backlayer   "tolay" "Lay2") )

(define null      (LayerActv       "imag"  image     "layer"    backlayer     ))

;Copy selection to transparent Layer                 

(define null      (SelectAddRect   "image" image     "x_upl"    10  "y_upl" 10  "w"  100  "h" 100 ))

(define float     (Select2Float    "layer" backlayer                     ) )

(define null      (Copy2Clip       "float" float                         ) )

(define fromClip  (PasteClip       "layer" lay1                          ) )

;Extract selection information

(define Arrayxywh (GetxyWH         "draw"  fromClip                      ) )

(define X         (vector-ref  Arrayxywh 0)                              )

(define Y         (vector-ref  Arrayxywh 1)                              )

(define W         (vector-ref  Arrayxywh 2)                              )

(define H         (vector-ref  Arrayxywh 3)                              )

(define LTx       (+ X  10    )) 

(define LTy       (+ Y  1     ))    

(define RTx       (+ X -10  W ))

(define RTy       (+ Y  2     ))

(define LBx       (+ X  1     ))

(define LBy       (+ Y -1   H ))

(define RBx       (+ X  1   W ))

(define RBy       (+ Y -1   H ))

;perspective distortion

(define null      (Perspect        "clip"  fromClip "LTx LTy RTx RTy LBx LBy RBx RBy LTx" LTy RTx RTy LBx LBy RBx RBy ) )

;remove float                     

(define fromClip  (GetFloat "imag" image ) )

(define null      (AnchrFloat    "imag"  image  ))




================Create_A_Mask=============================


;===========       tiger                       

(define fpath     "/Users/don_sauer/Desktop/Tiger.jpg" )

(define image     (Load-jpg        "path"  fpath     "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer   "image" image     "Layname" "backlayer" ) )

;add white mask

(define mask      (AddWhiteMask    "lay"   backlayer                    ) ) 

;add a black box to create a transparent area  

(define null      (SetColors       "fore"  '(0 0 0 ) "Back"    '(255 255 255) ) )                                        

(define null      (SelectAddRect   "image" image     "x_upl"    50  "y_upl" 50  "w"  100  "h" 100 ))

(define null      (SelectFillFG    "layer" mask                       ))

(define null      (MaskAtv         "layer" backlayer      "ON/Off"   1             ))



==============BUMP_Applications=====================================================



(define fpath     "/Users/don_sauer/Downloads/Applications/Graphic/gimp_imageProcess/pict/colortest.jpg" )

(define image     (Load-jpg      "path"  fpath      "name"    "Tiger.jpg" ) )

(define backlayer (NameBackLayer "image" image      "Layname" "backlayer" ) )

(define null      (SetColors     "fore" '(0 0 0 )   "Back"    '(255 255 255) ) )

;Create a Bump layer with BEVEL typed in

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "bump"  ) ) 

(define null      (LayerFill     "lay"   bump       "Type"    2  ))      ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define txtfloat  (Text          "imag"  image      "layer"    bump      "text" "BEVEL" "font" "Gill Sans Bold" 

                                  "size"  75         "xlt"      20        "ylt"  20  ))

(define null      (AnchrFloat    "imag"  image      ) )

;Apply bump layer to the image

(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" bump  "azi elev depth amb"  74 36 5 129 ))

;Turn off bump layer

(define null      (LayerVis      "layer" bump      "ON/Off"  0             ))




==============BUMP_Experiments=====================================================



 


(define image     (newRGBimage   "width" 300         "height"  300 ) )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image       "Layname" "backlayer" ) )

;===========       circ           fuzzy  black on     backlayer    

(define null      (AddEllipse    "imag"  image       "x y w h Rfeath" 50 50 200 200 10  )   ) 

(define null      (BuckFill      "lay"   backlayer   "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

;===========       make           bigger circle on    lay1

(define lay1      (CopyLayer     "imag"  image       "layer"   backlayer  "2layer" "lay1"  ) )

(define null      (grow          "imag"  image       "value"  25   )  )

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

;===========       lay2           contains lay1       mimus lay1 white

(define lay2      (CopyLayer     "imag"  image       "layer"   lay1  "2layer" "lay2"  ) ) 

(define null      (SelectColor   "layer" backlayer   "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (BuckFill      "lay"   lay2        "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNot     "imag"  image     )   ) 

;===========       Blur           lay2  

(define null      (Gauss         "imag"  image       "Lay"    lay2    "xRad" 20 "yRad" 20 )   )

;===========       make           lay1   green  

(define null      (LayerUp       "imag"  image       "Laynam"  lay1 ) )

(define null      (SelectColor   "layer" lay1        "color"   '(0 0 0 ) "thresshold" 10 ) )

(define null      (grow          "imag"  image       "value"  8   )  )

(define null      (SetColors     "fore" '(0 128 0 )  "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   lay1        "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image     )   ) 

;===========       inver           

(define null      (InvertLay     "lay"   lay2      ) )

(define null      (LayerActv     "imag"  image       "layer"   lay1     ))

;===========       bump     lay1

(define null      (bumpmap       "image" image       "layer"  lay1  "bump" lay2  "azi elev depth amb"  44 39 11 0 ))

;===========       shade inside

(define lay3      (mkTranslayer  "imag"  image       "fromlay" backlayer   "tolay" "Lay3") )

(define null      (AddEllipse    "imag"  image       "x y w h Rfeath" 60 60 190 190 10  )   )

(define null      (SetColors     "fore" '(0 0 0 )    "Back"    '(255 255 255) ) ) 

(define null      (BuckFill      "lay"   lay3        "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (LayerOpac     "lay"   lay3        "percnt"  25 ))

(define null      (SelectNot     "imag"  image     )   ) 



==============BUMP=====================================================



(define image     (newRGBimage   "width" 200       "height" 200 ) )

(define null      (SetColors     "fore" '(128 128 128 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "bump"  ) ) 

(define null      (LayerFill     "lay"   bump       "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (SetColors     "fore" '(0 0 0 )  "Back"    '(255 255 255) ) )

(define null      (SelectAddRect "image" image       "x_upl"    20  "y_upl" 20  "w"  120  "h" 120 ))

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (SelectAddRect "image" image       "x_upl"    50  "y_upl" 50  "w"  60  "h" 60 ))

(define null      (BuckFill      "lay"   bump       "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2) 

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    bump    "xRad" 5 "yRad" 5 )   )


(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" bump  "azi elev depth amb"  74 36 15 129 ))

(define null      (LayerVis      "layer" bump       "ON/Off"  0             ))


   


(define image     (newRGBimage   "width" 200       "height" 200 ) )

(define null      (SetColors     "fore" '(128 128 128 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "bump"  ) ) 

(define null      (LayerFill     "lay"   bump       "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (SetColors     "fore" '(127 127 127 )   "Back"    '(255 255 255) ) )

(define null      (SelectAddRect "image" image      "x_upl"    10  "y_upl" 10  "w"  140  "h" 140 ))

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

 

(define null      (shrink        "imag"  image       "value"  10   )  )

(define null      (SetColors     "fore" '(0 0 0 )  "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)


(define null      (shrink        "imag"  image       "value"  20   )  )

(define null      (SetColors     "fore" '(127 127 127 )   "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)


(define null      (shrink        "imag"  image       "value"  20   )  )

(define null      (BuckFill      "lay"   bump       "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNot     "imag"  image                  )) 


(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" bump  "azi elev depth amb"  74 36 15 129 ))

(define null      (LayerVis      "layer" bump       "ON/Off"  0             ))



(define image     (newRGBimage   "width" 200       "height" 200 ) )

(define null      (SetColors     "fore" '(128 128 128 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "bump"  ) ) 

(define null      (LayerFill     "lay"   bump       "Type"    1  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (SetColors     "fore" '(127 127 127 )   "Back"    '(255 255 255) ) )

(define null      (SelectAddRect "image" image      "x_upl"    10  "y_upl" 10  "w"  140  "h" 140 ))

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

 

(define null      (shrink        "imag"  image      "value"  10   )  )

(define null      (SetColors     "fore" '(0 0 0 )   "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   bump       "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)


(define null      (shrink        "imag"  image       "value"  20   )  )

(define null      (BuckFill      "lay"   bump       "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)


(define null      (shrink        "imag"  image       "value"  20   )  )

(define null      (SetColors     "fore" '(127 127 127 )   "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNot     "imag"  image                  )) 

(define null      (Gauss         "imag"  image       "Lay"    bump    "xRad" 10 "yRad" 10 )   )



(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" bump  "azi elev depth amb"  74 36 15 129 ))

(define null      (LayerVis      "layer" bump       "ON/Off"  0             ))





(define image     (newRGBimage   "width" 200       "height" 200 ) )

(define null      (SetColors     "fore" '(127 127 127 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )

(define null      (LayerFill     "lay"   backlayer "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer  "2layer" "bump"  ) )

(define null      (SetColors     "fore" '(0 0 0 )   "Back"    '(255 255 255) ) ) 

(define null      (LayerFill     "lay"   bump       "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5


(define null      (SelectAddRect "image" image      "x_upl"    10  "y_upl" 10  "w"  140  "h" 140 ))

(define null      (BuckFill      "lay"   bump       "fill"   0   )   ) ;FG(0),BG(1),PATTERN(2)

 

(define null      (shrink        "imag"  image      "value"  10   )  )

(define null      (SetColors     "fore" '(0 0 0 )   "Back"    '(255 255 255) ) )

(define null      (BuckFill      "lay"   bump       "fill"   1   )   ) ;FG(0),BG(1),PATTERN(2)

(define null      (SelectNot     "imag"  image                  )) 



(define null      (Gauss         "imag"  image       "Lay"    bump    "xRad" 10 "yRad" 10 )   )



(define null      (bumpmap       "image" image      "layer"  backlayer  "bump" bump  "azi elev depth amb"  74 36 15 129 ))

(define null      (LayerVis      "layer" bump       "ON/Off"  0             ))



==============BUMP_IN_OR_OUT???=====================================================




(define image     (newRGBimage   "width" 420       "height" 420 ) )

(define null      (SetColors     "fore" '(128 128 128 )  "Back"    '(255 255 255) ) )

(define backlayer (NameBackLayer "image" image     "Layname" "backlayer" ) )


(define null      (LayerFill     "lay"   backlayer "Type"    0  ))     ; FG0,BG1,W2,TRAN3,PAT4,NONE5 

(define bump      (CopyLayer     "imag"  image      "layer"   backlayer