Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
#!/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
You can’t perform that action at this time.