Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Collection Online
#2
Not that I have found, there is some content that's publicly available on github. I've been writing scripts for the batch processor, to add effects to video frames. An example could be something like:

(define (merger4 total prefix)

(let* (
; these variable are to accomdodate for increasing files names "file-0001", "file-0002" etc
(fname "frame-") (fnum "") (npad "")
(idx 0)
)

(gimp-plugin-enable-precision)

(while (< idx total)
(set! fname "new_frame-")
(set! fnum (string-append (number->string (+ idx 1)) ".jpg") )

(if (and (>= idx 0) (< idx 9)) (set! npad "0000") () )
(if (and (>= idx 9) (< idx 99)) (set! npad "000") () )
(if (and (>= idx 99) (< idx 999)) (set! npad "00") () )
(if (and (>= idx 999) (< idx 9999)) (set! npad "0") () )

(set! fname (string-append fname npad fnum))

(let* (
(image1 (car (gimp-image-new-with-precision 2100 1295 0 700)))
(layernova (car (gimp-layer-new image1 2190 1295 1 "layernova" 100.0 28)))
(laygroupM (car (gimp-layer-group-new image1)))
(x (sqrt (sqrt idx))) ;(blu "#0000EE")
(rf 0.43) (bf 0.43) (gf 0.43) (rc 1.3) (gc 1.3) (bc 1.5) (h 0.0) (i 0.0)
(re 0.66) (ge 0.655) (be 0.65) (bri 0.052) (sca 15.0) (pol -0.473)
)


(gimp-image-insert-layer image1 laygroupM 0 0)
(gimp-image-insert-layer image1 layernova laygroupM 1)

(set! h (+ (sin (+ (* 0.00105 idx) (* -1.0 (sin (* 0.037 idx))) 470 )) (* 0.003 idx) 1.47 ) )
(set! i (+ (cos (+ (* 0.0068 idx) (* -1.0 (tan (* 0.009 idx)) (cos (* 0.045 idx)) ) 6)) 1.48))

(set! rf (+ (* 9 h i 0.07) 0.2) )
(set! bf (+ (* 9 h i 0.075) 0.1))
(set! gf (+ (* 8.778 h i 0.07) 0.18))

(set! rc (+ (* (+ (* 0.001 idx) (* -1.0 i) 2.9) 0.6) 0.5))
(set! bc (+ (* (+ (* 0.002 idx) (* -1.0 i) 2.9) 0.55) 0.5))
(set! gc (+ (* (+ (* 0.0017 idx) (* -1.0 i) 2.8) 0.59) 0.43))

(plug-in-diffraction RUN-NONINTERACTIVE image1 layernova rf gf bf rc gc bc re ge be bri sca pol)


(let* (
(newlayer (car (gimp-layer-new-from-visible image1 image1 "newlayer")))
(fname3 (string-append prefix npad fnum))
)

(gimp-file-save RUN-NONINTERACTIVE image1 newlayer fname3 fname3)
(gimp-item-delete newlayer)
)

(gimp-image-delete image1)

)

(gimp-message (string-append (number->string (+ idx 1)) " of " (number->string total) " completed."))
(set! idx (+ idx 1))
)

)
)
Reply


Messages In This Thread
Script Collection Online - by calvin123 - 03-07-2024, 04:45 PM
RE: Script Collection Online - by rgbellotti - 04-30-2024, 01:35 AM
RE: Script Collection Online - by vitforlinux - 09-16-2024, 03:26 PM
RE: Script Collection Online - by Ofnuts - 09-16-2024, 05:30 PM
RE: Script Collection Online - by vitforlinux - 09-17-2024, 11:58 AM

Forum Jump: