Skip to content

Instantly share code, notes, and snippets.

@adsr303
Last active April 7, 2016 10:52
Show Gist options
  • Save adsr303/8710833 to your computer and use it in GitHub Desktop.
Save adsr303/8710833 to your computer and use it in GitHub Desktop.
Complex image operations using ImageMagick
#!/bin/bash
convert "$1" \( +clone -colorspace gray -negate -blur 0x300 \) \
-compose softlight -composite "$2"
#!/bin/bash
# First composite is a grain extract blend.
# Second composite is a grain merge blend.
convert "$1" \( +clone -colorspace gray \( +clone -blur 0x3 \) \
-compose mathematics -define compose:args='0,-1,1,0.5' -composite \) \
-compose mathematics -define compose:args='0,1,1,-0.5' -composite "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment