Is it possible to make new line with delimiter in label %t ?

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
anakin2255
Posts: 2
Joined: 2019-09-01T01:00:07-07:00
Authentication code: 1152

Is it possible to make new line with delimiter in label %t ?

Post by anakin2255 » 2019-09-01T01:12:40-07:00

Hi,

with function montage, I try to cut -set label %t in 2 lines with a delimiter character is is possible ?
filename=%t=line1_line2

montage *.jpg -tile "3x3" -geometry "600x900" -shadow -pointsize 26 -set label %t myfolder/trom.jpg



Thanks.

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

Re: Is it possible to make new line with delimiter in label %t ?

Post by fmw42 » 2019-09-01T10:41:44-07:00

I do not understand your question about delimiter character. What is line1 and line2?

montage does not know which line or row in the montage the image is on.

Perhaps I misunderstand what you are asking.

Your syntax is bad. Use -label before reading the input. So this works for me on Mac OSX

Code: Select all

montage -label %t_line1_line2 -tile x1 *.jpg x.jpg
It makes a 1 row image where each image has its name followed by the text _line1_line2, such as lena_line1_line2.

anakin2255
Posts: 2
Joined: 2019-09-01T01:00:07-07:00
Authentication code: 1152

Re: Is it possible to make new line with delimiter in label %t ?

Post by anakin2255 » 2019-09-01T14:55:32-07:00

Ok for the syntax. Actually, I do contact sheet with filename in label on 1 line. I would cut the filename string and write on 2 lines.
filename is text1delimitertext2, \n replace delimiter.
I don't find if it is possible to make function like cut or other on %t in command line.
Thanks for help.

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

Re: Is it possible to make new line with delimiter in label %t ?

Post by fmw42 » 2019-09-01T15:09:57-07:00

Sorry, I still do not understand. Please show and example of the input filename, text1 and text2. If you put your text into variables, then you can do

Unix Syntax for variables.

Code: Select all

text1="XYZ"
text2="123"
montage -label %t_${text1}_${text2} -tile x1 *.jpg x.jpg

Post Reply