Pokaż wiadomości
|
Strony: 1 2 3 [4] 5 6 ... 610
|
43
|
Hyde zone / Zlecę / Kupię / Odp: Opracowanie Skyptu Script-Fu
|
: 17.11.2022, 18:54:55
|
Takie coś? (define (resize-and-add-border image drawable) (gimp-image-undo-group-start image) (plug-in-autocrop RUN-NONINTERACTIVE image drawable)
(let* ( (current-width (car (gimp-image-width image))) (current-height (car (gimp-image-height image))) (square-size (if (or (> current-width 1490) (> current-height 1490)) 1500 (+ (max current-width current-height) 10) )) (wanted-width (min (- square-size 10) current-width)) (wanted-height (min (- square-size 10) current-height)) (ratio (min (/ wanted-width current-width) (/ wanted-height current-height))) (width (* ratio current-width)) (height (* ratio current-height)) )
(gimp-image-scale image width height) (gimp-image-resize image square-size square-size (/ (- square-size width) 2) (/ (- square-size height) 2)) )
(gimp-image-undo-group-end image) (gimp-displays-flush) )
(script-fu-register "resize-and-add-border" "<Image>/Script-Fu/Resize and add border" "Automatically adjust contrast of drawable" "Ziomioslaw" "Ziomioslaw" "2022" "*" SF-IMAGE "Image" 0 SF-DRAWABLE "Current Layer" 0 )
|
|
|
45
|
Hyde zone / Zlecę / Kupię / Odp: Opracowanie Skyptu Script-Fu
|
: 16.11.2022, 21:19:31
|
Spróbujcie teraz: (define (resize-and-add-border image drawable) (gimp-image-undo-group-start image) (plug-in-autocrop RUN-NONINTERACTIVE image drawable)
(let* ( (square-size 1500) (current-width (car (gimp-image-width image))) (current-height (car (gimp-image-height image))) (wanted-width (min (- square-size 10) current-width)) (wanted-height (min (- square-size 10) current-height)) (ratio (min (/ wanted-width current-width) (/ wanted-height current-height))) (width (* ratio current-width)) (height (* ratio current-height)) )
(gimp-image-scale image width height) (gimp-image-resize image square-size square-size (/ (- square-size width) 2) (/ (- square-size height) 2)) )
(gimp-image-undo-group-end image) (gimp-displays-flush) )
(script-fu-register "resize-and-add-border" "<Image>/Script-Fu/Resize and add border" "Automatically adjust contrast of drawable" "Ziomioslaw" "Ziomioslaw" "2022" "*" SF-IMAGE "Image" 0 SF-DRAWABLE "Current Layer" 0 )
Skaluje do max 1490 z zachowaniem proporcji, i umieszcza to w kwadracie, na środku.
|
|
|
48
|
Hyde zone / Zlecę / Kupię / Odp: Opracowanie Skyptu Script-Fu
|
: 14.11.2022, 22:37:18
|
To jeszcze nie skończone, ale zerknij, czy o coś takiego chodzi. (define (resize-and-add-border image drawable) (gimp-image-undo-group-start image) (plug-in-autocrop RUN-NONINTERACTIVE image drawable)
(let* ( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (new-width (if (< width 1490) width 1490)) (new-height (if (< height 1490) height 1490)) (square-size (if (< new-width new-height) new-width new-height)) )
(gimp-image-scale image square-size square-size) (gimp-image-resize image (+ square-size 10) (+ square-size 10) 5 5) (gimp-layer-resize-to-image-size drawable)
(gimp-selection-all image) (gimp-selection-border image 5) (gimp-edit-bucket-fill drawable BG-BUCKET-FILL NORMAL-MODE 100 0 0 0 0) )
(gimp-image-undo-group-end image) (gimp-displays-flush) )
(script-fu-register "resize-and-add-border" "<Image>/Script-Fu/Resize and add border" "Automatically adjust contrast of drawable" "Ziomioslaw" "Ziomioslaw" "2022" "*" SF-IMAGE "Image" 0 SF-DRAWABLE "Current Layer" 0 )
|
|
|
49
|
Hyde zone / Zlecę / Kupię / Odp: Opracowanie Skyptu Script-Fu
|
: 13.11.2022, 12:22:45
|
Co znaczy, że "obraz ma być kwadratem"? Czy chodzi o to, że one już są kwadratami? Czy, że ma być skalowany do kwadratu? Czyli zawsze skalujemy obraz do wymiarów kwadratu? w górę, czy w dół?
|
|
|
53
|
Hyde zone / Hyde park / Wielkanoc 2022
|
: 15.04.2022, 14:12:54
|
Smacznej kawusi o świątecznym poranku!
A, i jajeczka też. I zajączka, bo czekolada to dobra rzecz. Baranek jako bryłka cukru może trafić do gara, więc smacznego kompotu. Ale to, pewnie po świętach.
W imieniu administracji forum gimpuj.info, życzę Wam drodzy użytkownicy:
Wesołych Świąt
|
|
|
54
|
Hyde zone / Hyde park / Zmiany na wiosnę:)
|
: 01.04.2022, 08:59:42
|
Trzy owe ficzerki pojawiły się na forum, normalnie się takie ogłasza, ale rozruchu polecam je znaleźć Wam:) Kto pierwszy ten lepszy. Ahoj!
|
|
|
|
|
|