Skip to content

Instantly share code, notes, and snippets.

@burin
Created August 30, 2010 21:14
Show Gist options
  • Select an option

  • Save burin/558065 to your computer and use it in GitHub Desktop.

Select an option

Save burin/558065 to your computer and use it in GitHub Desktop.
# 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