Page 1 of 1

IM7: subimage specification returns no images

Posted: 2019-02-01T23:26:08-07:00
by Lars-Daniel
Hi there,

this has worked for years in IM6, I've changed montage to magick montage for IM7:

Code: Select all

magick montage "02_%04d.png[1-63]" -tile 9x7 -geometry 256x256+0+0 test.png
But now I'm getting tons of these:

Code: Select all

magick: subimage specification returns no images `02_0030.png' @ error/constitute.c/ReadImage/637.
magick: invalid image index `02_0031.png' @ error/list.c/CloneImages/281.
magick: subimage specification returns no images `02_0031.png' @ error/constitute.c/ReadImage/637.
magick: invalid image index `02_0032.png' @ error/list.c/CloneImages/281.
magick: subimage specification returns no images `02_0032.png' @ error/constitute.c/ReadImage/637.
magick: TooManyExceptions (exception processing is suspended) @ warning/exception.c/ThrowException/978.
magick: invalid image index `02_0033.png' @ error/list.c/CloneImages/281.
Of course, the files are existing and valid, identify doesn't show any problems.

my build is:

Code: Select all

Version: ImageMagick 7.0.8-25 Q8 x64 2019-01-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib
Seems like a bug to me :-(

Best regards,
Lars-Daniel

Re: IM7: subimage specification returns no images

Posted: 2019-02-02T00:26:28-07:00
by fmw42
Are you sure you have 64 images? If so, the indices should be [0-63] if you want all of them. Seems like it is not finding anything starting and following [32]. What is your OS?

This works for me on IM 7.0.8.25 Q16 Mac OSX Sierra

Code: Select all

magick rose: rose_00.png
magick rose: rose_01.png
magick rose: rose_02.png
magick rose: rose_03.png
magick montage "rose_%02d.png[0-3]" -tile 2x2 -geometry +2+2 result.png

Re: IM7: subimage specification returns no images

Posted: 2019-02-02T01:42:48-07:00
by Lars-Daniel
Thanks for your reply.
fmw42 wrote:
2019-02-02T00:26:28-07:00
Are you sure you have 64 images?
No, more than 64. That's why I'm not using an asterisk for globbing.
fmw42 wrote:
2019-02-02T00:26:28-07:00
If so, the indices should be [0-63] if you want all of them.
No, it starts at "..._0001.png"
fmw42 wrote:
2019-02-02T00:26:28-07:00
What is your OS?
Microsoft Windows 7 Professional, 64-bit (Version 6.1.7601)
fmw42 wrote:
2019-02-02T00:26:28-07:00
This works for me on IM 7.0.8.25 Q16 Mac OSX Sierra
Verified, this works.

Ahhh, have a look!

Code: Select all

# delete rose_00.png
magick rose: rose_01.png
magick rose: rose_02.png
magick rose: rose_03.png
magick rose: rose_04.png
magick montage "rose_%02d.png[1-4]" -tile 2x2 -geometry +2+2 result.png
Tadaa:

Code: Select all

montage: invalid image index `rose_01.png' @ error/list.c/CloneImages/281.
montage: subimage specification returns no images `rose_01.png' @ error/constitute.c/ReadImage/637.
montage: invalid image index `rose_02.png' @ error/list.c/CloneImages/281.
montage: subimage specification returns no images `rose_02.png' @ error/constitute.c/ReadImage/637.
montage: invalid image index `rose_03.png' @ error/list.c/CloneImages/281.
montage: subimage specification returns no images `rose_03.png' @ error/constitute.c/ReadImage/637.
montage: invalid image index `rose_04.png' @ error/list.c/CloneImages/281.
montage: subimage specification returns no images `rose_04.png' @ error/constitute.c/ReadImage/637.

Re: IM7: subimage specification returns no images

Posted: 2019-02-02T11:32:52-07:00
by fmw42
Agreed. If it starts with [0, it works fine even if it does not go to the last index. But if it starts with any other index, it fails.



This works:

Code: Select all

magick rose: rose_00.png
magick rose: rose_01.png
magick rose: rose_02.png
convert rose: rose_03.png
magick montage "rose_%02d.png[0-1]" -tile 2x1 -geometry +2+2 result.png
This fails:

Code: Select all

magick rose: rose_00.png
magick rose: rose_01.png
magick rose: rose_02.png
convert rose: rose_03.png
magick montage "rose_%02d.png[1-2]" -tile 2x1 -geometry +2+2 result.png
Tested with IM 7.0.8.25 Q16 Mac OSX

Re: IM7: subimage specification returns no images

Posted: 2019-02-02T14:19:30-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.