Skip to content

Instantly share code, notes, and snippets.

@cheeming
Last active August 29, 2015 14:05
Show Gist options
  • Save cheeming/c93aa22c4e302a9ab8ef to your computer and use it in GitHub Desktop.
Save cheeming/c93aa22c4e302a9ab8ef to your computer and use it in GitHub Desktop.
Gimp ScriptFu - Colorify your Image
; run the script in interactive gimp batch mode
; i.e.:
; $ gimp -i -b -
; copy and paste the following into the interactive shell
; do note that the code is Scheme, so you got to learn a new language ;)
(define (ccm-colorify filename
color)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(plug-in-colorify RUN-NONINTERACTIVE
image drawable color)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)))
(ccm-colorify "/tmp/test.png" '(255 0 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment