i would like to add a series of images to existing one, using imagemagick command line.
as you see, this is not only adding an image. i found http://www.imagemagick.org/Usage/compose/ where i could see some examples, but what i need is to fill each 'block'.
i have exact position where each block starts and ends, also i have a scale parameter to scale it down.
i think i could use
composite -geometry +31+105 toadd.gif source.gif newfile.jpg
but this is only one image added, and i need it scaled down.
i was wondering if i can create some kind of rectangles and fill them with my image.
any idea how it can be solved?
Convert would be better as you can keep adding images with composite or layers.
Here is a very rough example and I would probably start off with a longer section of wall so you could crop it when resizing. There is still going to be quite a bit of user input to fix the locations as I pressume you do not always have the same amount of walls at the same length. I would write some code to input details into a form as it would be easier than altering the code each time.
convert k0jbqs.jpg \
( 313386r.png -thumbnail x25 ) -gravity west -geometry +0+30 -composite \
( 313386r.png -thumbnail x25 ) -gravity center -geometry +80+30 -composite \
( 313386r.png -thumbnail x25 ) -gravity east -geometry +0+30 -composite \
output.png
You would need to take the line breaks out I just added those to make the code readable.
NOTES: Thumbnail resizes the brick image; you can forget the gravity and just use -geometry and the numbers are the positions from the top left corner and -composite puts the new image over the previous image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With