Page 1 of 1

SOLVED - montage - only get first frame of multi-image files?

Posted: 2016-05-28T19:24:05-07:00
by teracow
Hello,

When using montage, I tend to run it on all images (of various types) in the current directory to build a thumbnail gallery to give me an idea as to what that directory holds.

If one (or more) of those images is an animated GIF, montage inserts all the individual frames into the gallery image. Sometimes, this single GIF can be the majority of the gallery image. Thus, the gallery is not representative of the image directory.

Is there a way I can have it only include the first image frame and ignore the rest whenever it encounters multi-image files?

Thanks.

Re: montage - only get first frame of multi-image files?

Posted: 2016-05-28T19:41:02-07:00
by fmw42
specify image.gif[0]

That will select the first frame (numbered from 0)

You can add [0] to all your images, even if they only have one frame/page/layer.

See selecting frames at http://www.imagemagick.org/script/comma ... essing.php

In the future, please always provide your IM version and platform, since syntax may be different.

Re: montage - only get first frame of multi-image files?

Posted: 2016-05-28T19:49:14-07:00
by teracow
Thanks fred. :oops:

ImageMagick 6.8.9-8 Q16 x86_64 2016-05-05
on OpenSUSE 13.2 64b

Re: montage - only get first frame of multi-image files?

Posted: 2016-05-28T20:07:48-07:00
by teracow
So, instead of:

Code: Select all

$ montage * output.png
I'm now using:

Code: Select all

$ montage *[0] output.png
which is correctly grabbing only the first frame of each image.

Thanks!