Skip to content

Instantly share code, notes, and snippets.

@alirzaev
Created August 18, 2019 17:48
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 alirzaev/7861d39edd4b6e29ab7ca7395fbbc02b to your computer and use it in GitHub Desktop.
Save alirzaev/7861d39edd4b6e29ab7ca7395fbbc02b to your computer and use it in GitHub Desktop.
from gimpfu import *
def improve_grayscale(img):
ly2 = img.active_layer.copy()
img.add_layer(ly2)
pdb.plug_in_gauss_rle(img, ly2, 100, 1, 1)
ly2.mode = DIVIDE_MODE
img.flatten()
pdb.gimp_convert_grayscale(img)
[improve_grayscale(x) for x in gimp.image_list()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment