Placing image and joining commands

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
kevinleesmith
Posts: 20
Joined: 2014-10-17T03:12:47-07:00
Authentication code: 6789

Placing image and joining commands

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Placing image and joining commands

Post 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.
snibgo's IM pages: im.snibgo.com
kevinleesmith
Posts: 20
Joined: 2014-10-17T03:12:47-07:00
Authentication code: 6789

Re: Placing image and joining commands

Post 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?
kevinleesmith
Posts: 20
Joined: 2014-10-17T03:12:47-07:00
Authentication code: 6789

Re: Placing image and joining commands

Post by kevinleesmith »

ahhhhhhhhhhhhh

-append move it to the left but i expect -gravity North to make it go to the top - but it doesnt....
kevinleesmith
Posts: 20
Joined: 2014-10-17T03:12:47-07:00
Authentication code: 6789

Re: Placing image and joining commands

Post by kevinleesmith »

ahhh - swap!

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