Skip to content

Instantly share code, notes, and snippets.

@dahlia
Created August 23, 2013 03:10
Show Gist options
  • Save dahlia/6315170 to your computer and use it in GitHub Desktop.
Save dahlia/6315170 to your computer and use it in GitHub Desktop.
Darken images using Wand
from wand.color import Color
from wand.display import display
from wand.image import Image
with Image(filename='/Users/dahlia/Downloads/CS1255030-02A-BIG.jpg') as i:
with Image(background=Color('#00000099'), width=i.width, height=i.height) as black_60:
i.composite_channel('all_channels', black_60, 'darken', 0, 0)
display(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment