1

Lets say I have two jpg files. I want to create a series of images, where I move one of the images across the face of the other image. I can already do this in any number of graphical editors, but it takes time to perform the action and then to do a filesave.

But it would be much more useful if I could use a command, or a software to do such a job for me. For example, if I could specify to insert a jpg at a certain offset, and then move it in a certain direction a given number of pixels each time, for a given number of images.

Is there anything which can provide such a functionality?

3

ImageMagick's composite tool seems ideally suited to this. You'd do something like

composite -geometry +20+20 foreground.jpg background.jpg composite1.jpg
composite -geometry +30+20 foreground.jpg background.jpg composite2.jpg

etc. to produce composite1.jpg containing foreground.jpg laid over background.jpg at position 20×20, and composite2.jpg in the same way but at position 30×20.

The ImageMagick web site has quite a few composition examples.

  • This is absolutely perfect. Thank you so much. Worked exactly how I wanted it to. – LinuxNewby Mar 1 '17 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.