montage -label | resolution incorrect

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MikeS
Posts: 2
Joined: 2018-12-26T03:06:04-07:00
Authentication code: 1152

montage -label | resolution incorrect

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: montage -label | resolution incorrect

Post 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
snibgo's IM pages: im.snibgo.com
MikeS
Posts: 2
Joined: 2018-12-26T03:06:04-07:00
Authentication code: 1152

Re: montage -label | resolution incorrect

Post by MikeS »

%G did the trick
Thank you very snibgo
Post Reply