Page 1 of 1

Placing image and joining commands

Posted: 2018-12-14T08:07:44-07:00
by kevinleesmith
I have two commands.

The first one does what its supposed to do - put a box to the right of the image whose height is equal to the height of the input image with a width of 1131 pixels and fill it with some text.
input: http://pragmaticea.com/pragmatic/compon ... 000477.png
Output: http://pragmaticea.com/pragmatic/compon ... 000477.png

magick 000477.png ^
-size 1131x%[fx:h] -background None -fill #FFFFFF -gravity center caption:"'The Business' and IT are so intrinsically linked, a new paradigm is needed.|That paradigm is DOTS." ( +clone -sparse-color bilinear "0,0,#285EA6,%[fx:w-1],%[fx:h-1],#5E28A6" ) ( -clone 1,2 -compose DstOver -composite ) -delete 1,2 +append o000477.png


The second one does not. It is supposed to create a box equal to the width of the previous commands image with a hieght of 225 pixels (all this is does fine) but I want it to position that box at the top of previsous image (which is does not do, it just places it over to the right and in the middle)
input: http://pragmaticea.com/pragmatic/compon ... 000477.png
Output: http://pragmaticea.com/pragmatic/compon ... 000477.png
What is required: Output: http://pragmaticea.com/pragmatic/compon ... 000477.png

magick o000477.png ^
-size %[fx:w]x225 -background None -fill #FFFFFF -gravity center caption:"Why is the normal 'Business/IT' view of a company not appropriate for the 21st Century?" ( +clone -sparse-color bilinear "0,0,#285EA6,%[fx:w-1],%[fx:h-1],#5E28A6" ) ( -clone 1,2 -compose DstOver -composite ) -delete 1,2 +append z000477.png

Also, I want to join both of these commands together which I also cannot do!

Cheers.

Re: Placing image and joining commands

Posted: 2018-12-14T08:37:33-07:00
by snibgo
kevinleesmith wrote:... it just places it over to the right and in the middle ... +append
Well, yes, that's what "+append" does. See http://www.imagemagick.org/script/comma ... php#append

Perhaps you want "-compose Over -composite" instead.

I suggest you get the individual commands doing what you want before you combine them.

Re: Placing image and joining commands

Posted: 2018-12-14T09:05:06-07:00
by kevinleesmith
I have got the individual commands doing what I want.

I basically copied the first command (that adds a box to the right with text in it) and changed it sucessfuly to create another box ofd he correct size with text in it.

My problem is, I don't know how to get that long box to be positioned above and to the left, instead of in the middle and to the right.

On the plus side. I have managed to join the 2 commands together successfully.

Do I not have link to a proper help file? I am using https://imagemagick.org/script/command- ... php#option but many things I see people use do not seem to be listed or explained there. For example where do I look for help that explains how i cam move a generated image to where I want it?

Re: Placing image and joining commands

Posted: 2018-12-14T09:17:14-07:00
by kevinleesmith
ahhhhhhhhhhhhh

-append move it to the left but i expect -gravity North to make it go to the top - but it doesnt....

Re: Placing image and joining commands

Posted: 2018-12-14T09:23:37-07:00
by kevinleesmith
ahhh - swap!

By jove, I do believe he's getting it!