Created
June 3, 2014 14:31
-
-
Save dymio/8af33033186b9011a7f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
# Imagemagick analogue of Adobe Photoshop Gradient map with 75% opacity on it | |
# you will need the input.jpg file with original color image | |
# and gradient_line.png file with 256 x 1 px image of gradient | |
# make image grayscale | |
convert input.jpg -colorspace gray draft.jpg | |
# apply the gradient lut | |
convert draft.jpg gradient_line.png -clut draft.jpg | |
# set 75% opacity | |
convert draft.jpg -alpha on -channel a -evaluate set 75% draft.png | |
# impose result image on original image | |
convert the_in.jpg temp.png -gravity center -composite -format jpg -quality 90 output.jpg | |
# remove temporary files | |
rm draft.jpg && rm draft.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment