Posts: 1
Threads: 1
Joined: Mar 2024
Reputation:
0
Gimp version: 2.10
03-07-2024, 04:45 PM
Hi,
I am wondering if there is something like an online Gimp Script Fu collection, where you can see what others are doing, get some insights etc.
and also are able to share it?
I created my first script and wanted to share it somewhere because it was quite some work creating it.
Cheers
cal
Posts: 10
Threads: 4
Joined: Aug 2020
Reputation:
0
Operating system(s):
- Windows (Vista and later)
- Linux
Gimp version: 2.10
04-30-2024, 01:35 AM
(This post was last modified: 04-30-2024, 01:36 AM by rgbellotti.)
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))
)
)
)
Posts: 35
Threads: 1
Joined: Sep 2022
Reputation:
2
Operating system(s):
I also don't like the mess I end up making on Github, I think about leaving old versions next to the new ones to allow anyone who finds them to make comparisons... and it's a real mess.
So I thought about making two collections, one for Gimp 2.10 and one for 2.99.19... but this is also messy.
I believe that the cause of this disorder is largely my untidy and unrigorous head, but at least about 50 script-fu still live... the last patch was necessary for the change in 2.99.19 of script-fu- drop-shadow and script-fu-distress-selection.
Github isn't a real publishing platform, it's more of an open table where you put things down, knowing you'll find them, and everyone can watch, plus a kind of public backup.