RSS/Atom feed Twitter
Site is read-only, email is disabled

Image transformation batch processing

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Image transformation batch processing Saul Goode 26 May 21:43
  Image transformation batch processing JLuc 28 May 17:44
   Image transformation batch processing Ofnuts 28 May 19:50
Saul Goode
2015-05-26 21:43:34 UTC (almost 9 years ago)

Image transformation batch processing

The following code will work on GNU/Linux systems. It will only process the filesin the current directory (it will not recurse into subdirectories).

gimp -i -f -b - << factor 1)                     (gimp-image-scale image (/ w factor) (/ h factor))                     (set! w (car (gimp-image-width image)))                     (set! h (car (gimp-image-height image))))                   (if (< w h)
                    (gimp-image-resize image (max w h) (max w h) (/ (- h w) 2) 0)                     (gimp-image-resize image (max w h) (max w h) 0 (/ (- w h) 2))))                 (gimp-file-save 1 image (car (gimp-image-flatten image)) filename filename)                 (gimp-image-delete image))               (loop (cdr filepaths)))))))     (gimp-quit 0))
HERE

JLuc
2015-05-28 17:44:27 UTC (almost 9 years ago)

Image transformation batch processing

Le 26/05/2015 23:43, Saul Goode a écrit :

The following code will work on GNU/Linux systems. It will only process the filesin the current directory (it will not recurse into subdirectories).

What is that for a lisp-like code ?

JL

gimp -i -f -b - << factor 1)
(gimp-image-scale image (/ w factor) (/ h factor)) (set! w (car (gimp-image-width image))) (set! h (car (gimp-image-height image)))) (if (< w h)
(gimp-image-resize image (max w h) (max w h) (/ (- h w) 2) 0) (gimp-image-resize image (max w h) (max w h) 0 (/ (- w h) 2)))) (gimp-file-save 1 image (car (gimp-image-flatten image)) filename filename) (gimp-image-delete image)) (loop (cdr filepaths))))))) (gimp-quit 0))
HERE

_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list

Ofnuts
2015-05-28 19:50:20 UTC (almost 9 years ago)

Image transformation batch processing

On 28/05/15 19:44, JLuc wrote:

Le 26/05/2015 23:43, Saul Goode a écrit :

The following code will work on GNU/Linux systems. It will only process the filesin the current directory (it will not recurse into subdirectories).

What is that for a lisp-like code ?

JL

This is just a big Scheme script (Gimp's historical scripting language) as a here-document in a bash script.