montage tag produces double elements!?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Shaddix
Posts: 4
Joined: 2016-03-26T09:36:14-07:00
Authentication code: 1151

montage tag produces double elements!?

Post by Shaddix »

Hello everybody,

the command "montage label:"Test1" test.pdf" produces a pdf file which contains "Test1" TWO times.

Why does this happen? How can I avoid it?

(Version: ImageMagick 6.7.7-10 2014-03-06 Q16)

Thanks in advance

Shaddix
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage tag produces double elements!?

Post by fmw42 »

You need both an input an output image? I see only one.

Likely your PDF has two pages.

Please always provide your IM version and platform.
Shaddix
Posts: 4
Joined: 2016-03-26T09:36:14-07:00
Authentication code: 1151

Re: montage tag produces double elements!?

Post by Shaddix »

Hello,

my plattform is Linux version 3.19.0-32-generic (buildd@lgw01-43) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015

Adding an image didn't solve the problem: Both commands...
...montage label:"Test1" test.jpg test.pdf
...montage label:"Test1" test.jpg test.png
produce the same result. Two times "Test1" and one time the image.

Any other ideas?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: montage tag produces double elements!?

Post by snibgo »

Code: Select all

montage label:"Test1" test.jpg test.png
That code creates two images. The first is rasterised "Test1", which is also labelled "Test1" so that will appear beneath it, creating 2 versions of the text. The second is from test.jpg.

What you probably intended is:

Code: Select all

montage -label "Test1" test.jpg test.png
snibgo's IM pages: im.snibgo.com
Shaddix
Posts: 4
Joined: 2016-03-26T09:36:14-07:00
Authentication code: 1151

Re: montage tag produces double elements!?

Post by Shaddix »

montage -label "Test1" test.jpg test.png

This is not what I wanted to reach: I only wanted to produce the text "Test 1" (from the label) and not the image test.jpg.
We use the montage command exactly this way on our customers computer. There it works fine. On my computer at home it doesn't work.

What could I try?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage tag produces double elements!?

Post by fmw42 »

It could be your old version of IM at 6.7.7.10, which is over 150 versions old. Have you tried upgrading IM? Is your customers computer using the same version of IM and libjpeg?

Be sure to use -label "yourtext" and not label:"yourtext" as snibgo said above.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: montage tag produces double elements!?

Post by snibgo »

Shaddix wrote:We use the montage command exactly this way on our customers computer. There it works fine. On my computer at home it doesn't work.

What could I try?
I suggest should ensure you have the same version of IM as your customer.
Shaddix wrote:This is not what I wanted to reach: I only wanted to produce the text "Test 1" (from the label) and not the image test.jpg.
If I correctly understand you, then I suggest you use "caption:" instead of "label:", or override the label metadata.

Code: Select all

montage caption:"Test1" test.jpg out.png

montage -label "" label:"Test1" test.jpg out.png
snibgo's IM pages: im.snibgo.com
Shaddix
Posts: 4
Joined: 2016-03-26T09:36:14-07:00
Authentication code: 1151

Re: montage tag produces double elements!?

Post by Shaddix »

How can I find out my version of libjpeg?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage tag produces double elements!?

Post by fmw42 »

Shaddix wrote:How can I find out my version of libjpeg?

Code: Select all

convert -list format
JPE* JPEG rw- Joint Photographic Experts Group JFIF format (90)
JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (90)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format (90)

Says version 90.
Post Reply