Search code examples
imagemagick

Appending images together creates two different size attributes


I have two images, both 40x48. when I try to append them using

convert +append left.png right.png output.png

I get this

$ identify -ping output.png
output.png PNG 80x48 40x48+0+0 8-bit Grayscale Gray 4277B 0.000u 0:00.000

I'm trying to overlay an image over this with -gravity east and it's using the 40 instead of the 80. Is there any way to get this to align to the first dimension, or to set the second dimension to match the first?


Solution

  • In most cases after doing an -append it is good practice to use +repage to reset the new image's geometry. Try something like this...

    convert left.png right.png +append +repage output.png