combining multiple convert
Posted: 2015-01-25T14:33:00-07:00
Hi all, i'm brand new to imagemagick and immensely appreciate any help offered. I worked up this very inefficient shell script to crop and append right-eye.png in 4 different files.
It works fine for offline use, but i want to implement this script now within PHP and i have a hard time figuring out how to combine all these commands in to one.
Any help would be greatly appreciated.
It works fine for offline use, but i want to implement this script now within PHP and i have a hard time figuring out how to combine all these commands in to one.
Any help would be greatly appreciated.
Code: Select all
#!/bin/bash
# right-eye.png 1280x2879 Width by Height pixels
convert right-eye.png -crop 1197x153+41+72 sidesA-green1.png
convert right-eye.png -crop 1113x153+124+291 sidesA-green2.png
convert right-eye.png -crop 1035x153+202+510 sidesA-green3.png
convert right-eye.png -crop 958x153+279+729 sidesA-green4.png
convert right-eye.png -crop 1197x153+41+1030 sidesA-red1.png
convert right-eye.png -crop 1113x153+124+1249 sidesA-red2.png
convert right-eye.png -crop 1035x153+202+1468 sidesA-red3.png
convert right-eye.png -crop 958x153+279+1687 sidesA-red4.png
convert right-eye.png -crop 1197x153+41+1990 sidesA-black1.png
convert right-eye.png -crop 1113x153+124+2209 sidesA-black2.png
convert right-eye.png -crop 1035x153+202+2428 sidesA-black3.png
convert right-eye.png -crop 958x153+279+2647 sidesA-black4.png
convert sidesA-red1.png sidesA-green1.png sidesA-black1.png -append sidesA-greenredblack1.png
convert sidesA-green2.png sidesA-red2.png sidesA-black2.png -append sidesA-greenredblack2.png
convert sidesA-red3.png sidesA-green3.png sidesA-black3.png -append sidesA-greenredblack3.png
convert sidesA-green4.png sidesA-red4.png sidesA-black4.png -append sidesA-greenredblack4.png
echo ***DONE***