Created
March 18, 2011 16:54
-
-
Save tobrien/876410 to your computer and use it in GitHub Desktop.
This is a problem I used to solve with Photoshop macros. Here's the problem to be solved. You have hundreds of screen captures and you want to turn these screen captures into images with a dropshadow that will be included in a book. Add to this the
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/bash | |
# Convert Originals to Web Images | |
for IMAGE in `find ./orig -name "*.png"` | |
do | |
DEST_IMAGE=./web/`basename $IMAGE` | |
if [[ ! -e $DEST_IMAGE || $IMAGE -nt $DEST_IMAGE ]] | |
then | |
convert $IMAGE -verbose -compress jpeg \ | |
-quality 80 -bordercolor None -border 10x10 \ | |
\( +clone -background black -shadow 80x3+5+5 \) \ | |
-compose DstOver -composite -compose Over \ | |
$DEST_IMAGE | |
fi | |
done | |
# Convert Originals to Print Images | |
for IMAGE in `find ./orig -name "*.png"` | |
do | |
DEST_IMAGE=./print/`basename $IMAGE .png`.pdf | |
if [[ ! -e $DEST_IMAGE || $IMAGE -nt $DEST_IMAGE ]] | |
then | |
convert $IMAGE -resize 250% -compress jpeg \ | |
-quality 50 -density 150 -verbose \ | |
-bordercolor None -border 10x10 \ | |
\( +clone -background black -shadow 80x3+5+5 \) \ | |
-compose DstOver -composite -compose Over \ | |
$DEST_IMAGE | |
fi | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment