Page 1 of 1

montage -label | resolution incorrect

Posted: 2018-12-26T03:24:07-07:00
by MikeS
Hi ImageMagick Community,

after almost a decade of using ImageMagick this is the first "problem" I ever encountered.

I am trying to generate montages that include basic info about the pics, so using -label
Command Line:

Code: Select all

montage -verbose -label '%f %b\n%hx%w' -pointsize 10 -background '#000000' -fill 'gray' -define jpeg:size=350x350 -geometry 350x350+2+2 -auto-orient $1*.jpeg 0000_montage.jpeg
According to https://imagemagick.org/script/command- ... .php#label I expect the real image resolution, like the image file size but I get the resolution of the scaled down picture.

What am I doing wrong?

Sysinfo:

Code: Select all

$ montage -version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
Thanks a lot,
Mike

Re: montage -label | resolution incorrect

Posted: 2018-12-26T07:32:17-07:00
by snibgo
MikeS wrote:-define jpeg:size=350x350
I think this works as part of the JPEG decoding, so when the image is in memory and the real work starts, the image is 350x350.

You might find that "-resize" gives the results you want, but I'm not sure of the order of processing in montage.

You might also try %G. See http://www.imagemagick.org/script/escape.php

Re: montage -label | resolution incorrect

Posted: 2018-12-26T07:43:07-07:00
by MikeS
%G did the trick
Thank you very snibgo