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?".
AKapaceb
Posts: 8 Joined: 2019-03-21T00:52:55-07:00
Authentication code: 1152
Post
by AKapaceb » 2019-03-22T11:58:32-07:00
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!
GeeMack
Posts: 718 Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA
Post
by GeeMack » 2019-03-22T12:34:53-07:00
AKapaceb wrote: ↑ 2019-03-22T11:58:32-07:00 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 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.
AKapaceb
Posts: 8 Joined: 2019-03-21T00:52:55-07:00
Authentication code: 1152
Post
by AKapaceb » 2019-03-22T12:49:44-07:00
Excellent! It worked!
Thank very you, kind man!