montage -label "%w %h" regression

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Posts: 29
Joined: 2005-06-11T06:21:59-07:00

montage -label "%w %h" regression

Post by bablokb »


starting with 6.2.5 (?) the command

montage -size 120x120 -label "%f\n%w x %h\n%b" *.jpg index.png

gives "wrong" results for width and hight. Digging through various documentation I realize that the width and height are probably correct in the sense that it's the width and height of the loaded image, but in contrast to the filename (%f) it is not the width and hight of the original file (which was the former behavior and is expected).


montage -label "%f\n%w x %h\n%b" *.jpg index.png

gives correct results, but is so much slower for directories with large and many JPG-files that it turns montage unusable (for one of my sample directories 9s compared to 111s).

With 6.2.3 the first command gave the expected results so the change must have been either in 6.2.4 or 6.2.5.

My suggestion: either revert to the old behavior or add %W and %H for width and height of the original file.

Thanks, Bernhard
User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

In the next point release, due in about a week, we will have a patch that fixes the problem your reported. Use this command to get the desired results:
  • montage -size 120x120 -label "%f\n%[width] x %[height]\n%b" *.jpg index.png
Post Reply