![]() |
|
#1
|
||||
|
||||
|
i'm using gimp 2.6.6
make a file called: ~/.gimp-2.6/scripts/batch-crop.scm give it these contents: Code:
(define (batch-crop pattern width height xoffset yoffset)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ( (filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-image-crop image width height xoffset yoffset)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
)
)
Desktop/screenshots/1.png Desktop/screenshots/2.png open gnome-terminal and then cd to the folder where you have the images you want to batch crop, e.g.: Code:
cd Desktop/screenshots/ Code:
gimp -i -b '(batch-crop "*.png" 1185 667 5 672)' -b '(gimp-quit 0)' ref: http://www.geocities.com/hildstrom/p...ipt/index.html http://www.gimp.org/tutorials/Basic_Batch/
__________________
Nick Humphrey Download for free my experimental music, art, poetry and pictures. My album Classic E B-sides can be purchased on both itunes and amazon.com. Help me improve my phrasebook of world languages. I offer remote healing services. My blog. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| start stop kill outlook process program from dos command line bat or batch file | Nickleus | Windows Vista forum | 0 | 18-01-08 10:23 |
| linux bash - line 26: : command not found | Nickleus | Linux bash forum | 0 | 14-08-07 14:09 |
| how to backup a microsoft sql server (superoffice) database from the command line | Nickleus | SuperOffice forum | 0 | 21-05-07 10:01 |
| Linux bash - test.sh: line 3: FILENAME: command not found | Nickleus | Linux bash forum | 0 | 10-04-06 10:43 |