Arty wrote:I don't understand why second code doesn't work. Its identical to first one, except for values for -extent and -splice. What am I doing wrong?
As snibgo explained, at the point the first composite was made, your "forum_page.png" was larger than "forum_read.png". You composited the larger image over the smaller one, so the result was the size of the smaller image.
There are many ways to approach any given problem with ImageMagick. You might consider a slightly different approach to the whole thing to make the code simpler to understand and troubleshoot. Consider something like this...
Code: Select all
convert -background transparent \
forum_link.png forum_read.png forum_page.png -resize '50x50!' -append \
-gravity northeast -extent 550x500 -gravity northwest -extent 600x500 test3a.png
That brings in all your images, resizes them to 50x50, and appends them vertically. At that point you're mostly done. Then with "-gravity" and "-extent" (or even "-splice") you can tweak the finished size of the canvas.
It could also be done by building a background canvas of your finished size, appending the three small images into one, and compositing that over the transparent canvas at the place you want them to be. Something like this...
Code: Select all
convert -size 600x500 xc:transparent \
\( forum_link.png forum_read.png forum_page.png -resize '50x50!' -append \) \
-gravity northeast -geometry +50+0 -composite test3b.png
That gets you away from those sort of nested composites, which was where you ran into an issue the first time.