Animation strip

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
sfg
Posts: 17
Joined: 2009-12-30T13:44:31-07:00
Authentication code: 8675309

Animation strip

Post by sfg »

Hi,

Is there anyway to create an animation strip from a set of images?
For example, from these images:
Image Image Image Image Image Image Image Image Image Image

I want to create this:
Image

I've tried with "montage" but I can only get them to be put side by side and that would result in a 2 pixel wide border where they meet and I need to have just one pixel.

Or is there any better... like having the images without borders and having ImageMagick do the borders automatically?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animation strip

Post by fmw42 »

montage is what you want. it will do the job if you give it the right params

see http://www.imagemagick.org/Usage/montage/ esp http://www.imagemagick.org/Usage/montage/#tile

try

montage image1 image2 ... image10 -tile 5x2 -geometry +1+1 resultimage
sfg
Posts: 17
Joined: 2009-12-30T13:44:31-07:00
Authentication code: 8675309

Re: Animation strip

Post by sfg »

Actually, I found a way to do it like this:

mogrify -gravity NorthWest -chop 1x1 *.png
montage -mode concatenate *.png -tile 5x2 -background none 1.png
convert 1.png -gravity NorthWest -background black -splice 1x1 1.png

Basically, it cuts the left and top edges of each frame (so the edges are not repeated to create 2 pixel wide ones), then puts them in one file and finally it adds edges to the left and top of the final image to account for the frames which didn't receive edges from adjacent frames because they had none in that direction.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animation strip

Post by fmw42 »

if you only want one row, you can use -append. if you want two rows (make each row) then use +append to put them together as two rows.

you can also use -geometry -1-1 to try to eliminate extra space
sfg
Posts: 17
Joined: 2009-12-30T13:44:31-07:00
Authentication code: 8675309

Re: Animation strip

Post by sfg »

you can also use -geometry -1-1 to try to eliminate extra space
I've tried that, but that cuts the edges of the final image plus the images will not overlay as needed. I need the first left column of pixels of an image to overlay with the last right column of pixels of the previous image so the 1 pixel frame is preserved.
But anyway, as I said, I've found another solution.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Animation strip

Post by anthony »

Their is a script called "gif_montage_anim" which creates a montage of an animation with options for colasing, labels etc. See IM Examples, Animation Basics where it is interoduced.
The Script itself is in the scripts arera of IM Examples.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animation strip

Post by fmw42 »

joanart wrote:How do you upload numerous files or images at the same time? I used to use a folder at geocities and all images would upload, but they are no longer an option since they are no longer free... :?
You must be using MagickStudio. You probably should post there as this forum is more for commandline users who are on a computer hosting IM. I know little about MagickStudio, so hopefully one of the IM experts can respond. I have no idea if MagickStudio can upload multiple images at one time or even a folder of images.

If this is not the case, I apologize, but then perhaps you can give more details about where you want to upload and if this is to a server or web site, etc, and what IM software you are usinig. Most people who upload to a server use some form of FTP application or the server has some software specifically for uploading pictures.
Post Reply