ziguzagu.org

(Image|Graphics)Magick の resize 後のサイズは四捨五入された値

(Image|Graphics)Magick は resize 後の横縦サイズは小数部分(第1位であろう)を四捨五入している。らしい。

Distort Resize - free-form resizing

All the above resize methods all have one limitation which we touched on earlier, they will round the size of the new image to an integer number of pixels, then map the old image’s pixels to the new pixel array.

http://www.imagemagick.org/Usage/resize/

なので、サムネイル画像を動的につくっているけど、その img 要素の width, height を事前に埋めたいときには、四捨五入して計算すること。で、うまくいっている風。