Page 1 of 1

montage - ignore specific file?

Posted: 2016-05-28T21:14:35-07:00
by teracow
Hello,

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

Is there a way to force montage to grab everything in a directory except for specific files? Or will I need to send it a list of files (minus the ones I dont want)?

if I have these files:

Code: Select all

a.gif
b.jpeg
c.png
d.abc
and then run:

Code: Select all

$ montage * output.png
I get:

Code: Select all

montage: no decode delegate for this image format `ABC' @ error/constitute.c/ReadImage/501.
The output image is still created, but it causes montage to exit with error code 1. I'm trying to avoid this. So I need to tell it to ignore or skip 'd.abc' or to only process MIME image types.

Any ideas?

Re: montage - ignore specific file?

Posted: 2016-05-28T22:36:08-07:00
by fmw42
IM looks to see if you have valid image types and apparently does not recognize .abc as proper or the image does not have a proper/valid magick value (%m). IM mostly uses delegate libraries for different image formats, such as JPG, PNG, TIFF.

I suspect you will need to filter your list of images to standard suffixes. You can do that with the unix tools cd, ls and grep and pipe that to montage. grep -v will exclude the names

Code: Select all

ls | grep -v "abc" | montage - ....

Re: montage - ignore specific file?

Posted: 2016-05-28T23:22:10-07:00
by teracow
Okiedoke. Thanks Fred. :)