Skip to content

Instantly share code, notes, and snippets.

@sm-g
Last active August 29, 2015 14:20
Show Gist options
  • Save sm-g/fe18f02325b9ad6a3f28 to your computer and use it in GitHub Desktop.
Save sm-g/fe18f02325b9ad6a3f28 to your computer and use it in GitHub Desktop.
gimp mycrop pattern
(define (mycrop pattern)
(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 608 164 21 301)
(file-png-save-defaults RUN-NONINTERACTIVE image (car (gimp-image-get-active-layer image)) filename filename)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment