Page 1 of 1

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

Posted: 2019-09-01T01:12:40-07:00
by anakin2255
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.

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

Posted: 2019-09-01T10:41:44-07:00
by fmw42
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.

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

Posted: 2019-09-01T14:55:32-07:00
by anakin2255
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.

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

Posted: 2019-09-01T15:09:57-07:00
by fmw42
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