Skip to content

Instantly share code, notes, and snippets.

@velikodniy
Last active October 18, 2015 18:36
Show Gist options
  • Save velikodniy/9306373 to your computer and use it in GitHub Desktop.
Save velikodniy/9306373 to your computer and use it in GitHub Desktop.
#!/bin/bash
# 150% fullscreen
EVEN_UP_CROP=179
ODD_DOWN_CROP=16
#result
SIZE=918x1192
SHIFT=+215+138
num=1
count=1
for f in *.png
do
if [ $num -eq 1 ]
then
odd=$f
num=2
else
even=$f
montage -geometry +0+0 -tile 1x2 \
\( "$odd" -crop -0-$ODD_DOWN_CROP \) \
\( "$even" -crop +0+$EVEN_UP_CROP \) \
-crop $SIZE$SHIFT \
$count.png
num=1
echo -n [$count]
((count++))
fi
done
echo '...DONE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment