Page 1 of 1

Vertical text on the right side.. I do not understand how?

Posted: 2019-03-22T11:58:32-07:00
by AKapaceb
Friends,
help with the command please!

In the picture on the left side, the text is obtained using the command:

Code: Select all

convert input.jpg -set option:my:left_edge '0,%[fx:h/2]' \
          \( -font '/var/www/photos/fonts/10051.ttf' -pointsize 50 -background none label:'Long Long Text Here' \
             +distort SRT '%[fx:w/2],%h 1 90 %[my:left_edge]' \
          \) -flatten example.jpg
But I need a text that is placed on the right side of the picture (i marked red color). How to do it? I went through all the options, I do not understand ..

Help me please!
Thanks!

Image

Re: Vertical text on the right side.. I do not understand how?

Posted: 2019-03-22T12:34:53-07:00
by GeeMack
AKapaceb wrote: 2019-03-22T11:58:32-07:00In the picture on the left side, the text is obtained using the command:

Code: Select all

convert input.jpg -set option:my:left_edge '0,%[fx:h/2]' \
          \( -font '/var/www/photos/fonts/10051.ttf' -pointsize 50 -background none label:'Long Long Text Here' \
             +distort SRT '%[fx:w/2],%h 1 90 %[my:left_edge]' \
          \) -flatten example.jpg
But I need a text that is placed on the right side of the picture (i marked red color). How to do it?

I don't have a *nix shell to test this, but a few minor changes to your command should do it. Try this...

Code: Select all

convert input.jpg  -set option:my:right_edge '%[w],%[fx:h/2]' \
          \( -font '/var/www/photos/fonts/10051.ttf' -pointsize 50 -background none label:'Long Long Text Here' \
             +distort SRT '%[fx:w/2],%h 1 -90 %[my:right_edge]' \
          \) -flatten example.jpg
That sets the location variable to the right edge "%[w]" instead of the left "0". It also rotates the label -90 degrees instead of 90.

Re: Vertical text on the right side.. I do not understand how?

Posted: 2019-03-22T12:49:44-07:00
by AKapaceb
Excellent! It worked!

Thank very you, kind man!