New to ImageMagick. Need help.

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
treija01
Posts: 3
Joined: 2013-07-02T12:52:53-07:00
Authentication code: 6789

New to ImageMagick. Need help.

Post by treija01 »

I just installed ImageMagick today and I am having trouble using it. I have a movie file that is split up into image frames. The movie is simply two triangles following each other. I need to be able to adjust the spacing of the triangles and control the timing that they move within the movie. This can be simply done by moving the triangles within the individual frames before playing them together as a movie. How should I go about this using ImageMagick? Is the best way to crop the triangles and move them somewhere else on the image? I wasn't sure if this was the best method. I also don't fully understand how the cropping works. I''m also using the program through python. Thanks for your help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: New to ImageMagick. Need help.

Post by snibgo »

Changing the timing could be a simple as dropping frames (to speed up the action) or duplicating frames (to slow it down).

Is the background a solid colour (like white or red or anything else)? If so, you could us IM to crop out a rectangle that contains a triangle, fill in where it was with the background colour, and composite it in some other place.
snibgo's IM pages: im.snibgo.com
treija01
Posts: 3
Joined: 2013-07-02T12:52:53-07:00
Authentication code: 6789

Re: New to ImageMagick. Need help.

Post by treija01 »

Yes, the background is white. So I guess the best method would be to to crop the image and add frames.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: New to ImageMagick. Need help.

Post by fmw42 »

if the background is a constant color and there is only one object, then you can use -roll to shift the position in x and/or y. The rest of the image will wrap around as it is shifted. But since the background is constant you won't notice any changes.

see
http://www.imagemagick.org/script/comma ... s.php#roll
treija01
Posts: 3
Joined: 2013-07-02T12:52:53-07:00
Authentication code: 6789

Re: New to ImageMagick. Need help.

Post by treija01 »

I'll try that. Would it be better to try to use video editing software rather than ImageMagick?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: New to ImageMagick. Need help.

Post by fmw42 »

I have no idea, since I do not do much video and do not know of any tools for such.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: New to ImageMagick. Need help.

Post by snibgo »

ImageMagick is a great tool for individual images, but knows almost nothing about movies.

Most video editing software has simple features to speed up or slow down the video. Ordinary consumer editors don't (as far as I know) have features that allow you to easily cut out elements from a frame and move it around, especialy in a way that will look coherent from one frame to the next.

It can be done, of course. My own video editor (which uses ImageMagick, ffmpeg, Sox and cSound to do the real work) could be used to split your video into two streams, each containing just one triangle. Then each stream can be manipulated -- pan, zoom, etc -- to move the triangles independently of each other. Then it would overlay the two streams.

I know of one other free editor, "Blender", that might be able to do the job. But it's not easy to use. Adobe tools would be much easier, but not cheap. Avid would also do the job, if you have a professional budget (or have a suitable friend).
snibgo's IM pages: im.snibgo.com
Post Reply