Created
August 30, 2010 21:14
-
-
Save burin/558065 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
| # usage: ./lomo.sh filename.png | |
| # generate a mask with the vignetting to stick on the image | |
| convert -size 80x60 xc:black \ | |
| -fill white -draw 'rectangle 1,1 78,58' \ | |
| -gaussian 7x15 +matte lomo_mask.png | |
| mogrify -resize 800x600 -gaussian 0x5 lomo_mask.png | |
| # Change contrast and saturation | |
| convert -contrast -contrast -modulate 100,150 -resize 800x600 $1 $1_lomo.png | |
| # stick the vignette mask onto the photo | |
| composite -compose Multiply lomo_mask.png $1_lomo.png $1_output.png | |
| # Output before/after sample | |
| montage $1 $1_output.png -geometry 480x320 -quality 100 montage.jpg | |
| rm $1_lomo.png lomo_mask.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment