Skip to content

Instantly share code, notes, and snippets.

@jarnik
Created May 3, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarnik/f7dc069d67a0e32c3873bd3453e9a9ee to your computer and use it in GitHub Desktop.
Save jarnik/f7dc069d67a0e32c3873bd3453e9a9ee to your computer and use it in GitHub Desktop.
;; License GNU/GPL
;; Author Jaroslav Meloun
(define (script-fu-remove-unused-colors img drawable)
(let* (
)
(gimp-image-undo-group-start img)
(gimp-convert-rgb img)
(gimp-image-convert-indexed
img
0
0
255
FALSE
TRUE
""
)
(gimp-image-undo-group-end img)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-remove-unused-colors"
_"Remove unused indexed colors"
_"Remove unused indexed colors"
"Jaroslav Meloun"
"Jaroslav Meloun"
"2017"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)
(script-fu-menu-register "script-fu-remove-unused-colors"
"<Image>/Colors")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment