Page 1 of 1
append and positioning
Posted: 2016-08-22T01:27:21-07:00
by agriz
How do i re-position images when i use +append?
Code: Select all
convert -size 500x500 image1.jpg image2.jpg image3.jpg image4.jpg +append output.jpg
How do i move those images over that 500x500 canvas?
I can use -composite. How do i do it with append?
Re: append and positioning
Posted: 2016-08-22T09:49:04-07:00
by fmw42
See -swap at
http://www.imagemagick.org/Usage/basics/#swap. You can also just list your images in the order you want them appended. There is no need for -size 500x500. The output of append will be as large as needed to hold your images.
Re: append and positioning
Posted: 2016-08-22T09:56:20-07:00
by fmw42
See
http://www.imagemagick.org/Usage/layers/#append. Append just puts the images together. It has no size control. Any mismatched sizes will be filled with background color. If you want to put images in special places in a 500x500 background image, then you need either -compose over -composite (pair-wise) or -page ... -flatten. See
http://www.imagemagick.org/Usage/layers/#flatten
Re: append and positioning
Posted: 2016-08-22T10:13:16-07:00
by Bonzo
I think this is a follow on post from this
thread fmw42
Re: append and positioning
Posted: 2016-08-22T10:16:47-07:00
by Bonzo
I would probably use -layers and there are some examples on this
page
Re: append and positioning
Posted: 2016-08-22T10:17:13-07:00
by agriz
Yes sir. But question will be useful to others. I asked here.
Thanks for layers link. It is working good.
Is there any face detecting algorithm in imagemagick?
Re: append and positioning
Posted: 2016-08-22T10:20:21-07:00
by Bonzo
Not that I know of; but there was a thread about it a couple of years ago. I tried it out with php and an external library but I have formatted my PC since then and no longer have the code.
Re: append and positioning
Posted: 2016-08-22T10:23:01-07:00
by Bonzo
I have had a look through the forum and I based my code on:
http://liuliu.me/ccv/js/nss/
Re: append and positioning
Posted: 2016-08-22T10:41:00-07:00
by fmw42
What was the outline of the methods used in your IM code or do you have a link to your IM code.
Re: append and positioning
Posted: 2016-08-22T11:57:50-07:00
by Bonzo
I have deleted the code from my server and PC.
As far as I can remember:
1/ Send the image from the webpage to php via Ajax and base64
2/ Save a temporary file for the next stage. If you can remember back a few years I was having a problem with base64 and so I had to do this step with GD as I could not get IM to work. If I could have got the base64 to work I could probably have avoided the temporary image.
3/ Cropped out all the heads with IM and saved each one.
4/ Draw a red square outline around each head with IM, resize and save.
It worked quite well on my sample images but I did not take it any further. The main idea was to generate a webpage with the main image and heads outlined then a list of heads with a space next to it. I was then going to supply links to relatives and they could then use an online form to fill in the missing names or supply alternative names if they thought any were incorrect.
Re: append and positioning
Posted: 2016-08-22T14:56:38-07:00
by fmw42
The question is how did you detect where the head areas were in the image.
Re: append and positioning
Posted: 2016-08-22T23:33:12-07:00
by Bonzo
I used
http://liuliu.me/ccv/js/nss/ and it gave me the co ordinates