Created
September 14, 2015 02:05
-
-
Save JacksonBates/4f70cfc24fc4ac0c73cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Tutorial available at: https://www.youtube.com/watch?v=5Ld8Todog5s | |
# Feedback welcome: [email protected] | |
from gimpfu import * | |
def extreme_unsharp_desaturation_options(image, drawable, radius, amount, mode): | |
pdb.gimp_image_undo_group_start(image) | |
threshold = 0 | |
pdb.plug_in_unsharp_mask(image, drawable, radius, amount, threshold) | |
pdb.gimp_desaturate_full(drawable, mode) | |
pdb.gimp_image_undo_group_end(image) | |
register( | |
"python-fu-extreme-unsharp-desaturation-options", | |
"Unsharp mask and desaurate image, with options", | |
"Run an unsharp mask with variables set by user", | |
"Jackson Bates", "Jackson Bates", "2015", | |
"Extreme unsharp and desaturate options...", | |
"RGB", | |
[ | |
(PF_IMAGE, "image", "takes current image", None), | |
(PF_DRAWABLE, "drawable", "Input layer", None), | |
(PF_SLIDER, "radius", "Radius", 5, (0, 500, 0.5)), | |
# note extra tuple (min, max, step) | |
(PF_SLIDER, "amount", "Amount", 5.0, (0, 10, 0.1)), | |
(PF_RADIO, "mode", "Set Desauration mode: ", DESATURATE_LIGHTNESS, | |
( | |
("Lightness", DESATURATE_LIGHTNESS), | |
( "Luminosity", DESATURATE_LUMINOSITY), | |
("Average", DESATURATE_AVERAGE) | |
) | |
) | |
], | |
[], | |
extreme_unsharp_desaturation_options, menu="<Image>/Filters/Enhance") | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment