i have accomplished this with 5 system calls and a 6th one to clean up the files.
Code: Select all
### Crop Bottom
system("/usr/local/bin/convert path/to/bot.png'[1920x1080]' -crop 1920x1017+0+0 path/to/b.png");
### Crop Top
system("/usr/local/bin/convert path/to/top.png'[1920x1080]' -crop 1920x690+0+0 path/to/t.png");
###Position Bottom of Image
system("/usr/local/bin/composite -gravity SouthWest path/to/b.png path/to/ovrlay.png path/to/x.png");
###Position Top of Image
system("/usr/local/bin/composite -gravity NorthWest path/to/t.png path/to/x.png path/to/y.png");
###Overlay Frame
system("/usr/local/bin/composite -gravity NorthWest path/to/ovrlay.png path/to/y.png path/to/output.jpg");
###CleanUp Temp files
system("rm path/to/*.png");
Code: Select all
composite -gravity NorthWest path/to/ovrlay.png \(composite -gravity NorthWest \(convert path/to/top.png'[1920x1080]' -crop 1920x690+0+0\) \(composite -gravity SouthWest \(convert path/to/bot.png'[1920x1080]' -crop 1920x1017+0+0\) path/to/ovrlay.png \) \) path/to/output.jpg