I am trying to append multiple PNG files, which are of different dimensions, into a single combined image.
I want individual 'layers' to be centered.
This is what I am trying to achieve in pictorial form:
A simple:
convert a.png b.png c.png -flatten combined.png
results in:
...and I was able to center everything by manually specifying offsets ('-page +X+Y'
) but I was wondering if there is an automatic way of achieving this.
You can avoid the temporary file by compositing b.png
onto a.png
and then c.png
on top of that like this:
convert -gravity center a.png b.png -composite c.png -composite result.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With