diff options
-rw-r--r-- | 2.10/przem-apply-waves-effect.scm | 60 | ||||
-rw-r--r-- | changelog.md | 6 |
2 files changed, 25 insertions, 41 deletions
diff --git a/2.10/przem-apply-waves-effect.scm b/2.10/przem-apply-waves-effect.scm index 52effba..5ded293 100644 --- a/2.10/przem-apply-waves-effect.scm +++ b/2.10/przem-apply-waves-effect.scm @@ -1,42 +1,22 @@ -; apply-waves-effect - Script-fu dodający efekt fali +; apply-waves-effect - Script-fu dodający efekt falowania ; author: PRP ; licencja: Public Domain -; Gdańsk - 26-02-2025 -; ver. 1.250226-0 +; Gdańsk - 25-02-2025 +; ver. 1.250225-2 -;(define (przem-apply-waves-effect image drawable amplitude wavelength phase type) -;(define (przem-apply-waves-effect image drawable) - -; (let* ( -; (width (car (gimp-image-width image))) -; (height (car (gimp-image-height image))) - ; (amplitude 10) ; Amplituda fal - ; (wavelength 50) ; Długość fali - ; (type 0) ; Typ fali (0 - sinusoidalna, 1 - trójkątna, 2 - prostokątna) - ; (phase 0) ; Faza fali -; ) - ; (plug-in-waves RUN-NONINTERACTIVE image drawable amplitude wavelength type phase) - ; ) -;) (define (przem-apply-waves-effect image drawable amplitude frequency phase) (let* ( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (new-image (car (gimp-image-duplicate image))) (new-drawable (car (gimp-image-get-active-drawable new-image))) - (pixw (cons-array 3 'byte)) (resize-y 0) (resize-x 0) (y 0) - (x 0)) - - (aset pixw 0 255) - (aset pixw 1 255) - (aset pixw 2 255) - ;(gimp-image-insert-layer new-image new-drawable 0 -1) + (x 0) + (counter 0)) (gimp-selection-none new-image) - (gimp-context-push) (gimp-context-set-defaults) @@ -46,6 +26,7 @@ (set! resize-x (+ x (* amplitude (sin (+ (* frequency x) phase))))) (set! resize-y (+ y (* amplitude (cos (+ (* frequency y) phase))))) (set! x (+ x 1)) + (set! counter (+ counter 1)) ) (set! x 0) (set! y (+ y 1)) @@ -64,17 +45,19 @@ (let* ( (new-x (+ x (* amplitude (sin (+ (* frequency x) phase))))) (new-y (+ y (* amplitude (cos (+ (* frequency y) phase))))) - (color (cdr (gimp-image-pick-color image drawable x y FALSE FALSE 1))) - ;(pre-pixel (vector (gimp-drawable-get-pixel drawable x y))) - ;(pixel0 (vector-ref pre-pixel 0) ) - ;(pixel1 (vector-ref pre-pixel 1) ) - ;(pixel2 (vector-ref pre-pixel 2) ) - (type (car (gimp-drawable-get-pixel drawable x y))) - (pixel (cdr (gimp-drawable-get-pixel drawable x y))) + (color (car (gimp-image-pick-color image drawable x y FALSE FALSE 1))) ) - (gimp-drawable-set-pixel new-drawable new-x new-y 3 color) - (gimp-message "Test image saved.") - (display "pixel: ") (displayln pixel) + (gimp-context-set-foreground color) + ;(gimp-brushes-refresh) + (gimp-context-set-brush "Circle (01)") + (gimp-context-set-brush-size 1) + (gimp-context-set-brush-angle 0.0) + (gimp-context-set-brush-hardness 1.0) + (gimp-context-set-opacity 100.0) + (gimp-pencil new-drawable 2 (vector new-x new-y)) ; Narysuj punkt + + (gimp-message "Wait...") + ;(display "pixel: ") (displayln pixel) ) (set! x (+ x 1)) ) @@ -101,18 +84,13 @@ _"Dodaje efekt fali do zdjęcia" "Przenmysław R. Pietraszczyk" "Public Domain" - "2025-02-23" + "2025-02-25" "RGB*, GRAY*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 - ;SF-ADJUSTMENT "Amplitude" '(10 0 100 1 10 0 0) - ;SF-ADJUSTMENT "Wave Length" '(50 0 100 1 10 0 0) - ;SF-ADJUSTMENT "Phase Wave" '(0 0 100 1 10 0 0) - ;SF-OPTION "Type" '("Sinusoidal" "Triangle" "Rectangular") SF-VALUE "Amplitude" "10" SF-VALUE "Frequency" "0.1" SF-VALUE "Phase" "0" - ) (script-fu-menu-register "przem-apply-waves-effect" "<Image>/Filters/PIETRASZCZYK") diff --git a/changelog.md b/changelog.md index 4224953..5b053a3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +# [2.250225-2] przem-apply-waves-effect.scm
+* Filtr, działać, działa. Jednak wynik, trudno uzanć za falowanie.
+
+# [2.250225-1] przem-apply-waves-effect.scm
+* Pierwszy mały sukces
+
# [2.250225-0] przem-apply-waves-effect.scm
* Próba skopiowania barwy pixela
|