Hi,
I use
convert box[1-12].png +append allboxes.png
to append several boxes to a single picture. Sadly the result contains only the boxes 10 to 12. Am I missing something here?
(ImageMagick-6.6.5-Q16-windows on Vista Pro 64bit)
Peter
append problem with more than 9 files
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: append problem with more than 9 files
Try this:
Pete
Code: Select all
convert box%2d.png[1-12] +append allboxes.png
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
Re: append problem with more than 9 files
$ convert box%2d.png[0-12] +append text.pngel_supremo wrote:Try this:PeteCode: Select all
convert box%2d.png[1-12] +append allboxes.png
convert.exe: unable to open image `box%2d.png': No such file or directory @ error/blob.c/OpenBlob/2572.
convert.exe: unable to open file `box%2d.png' @ error/png.c/ReadPNGImage/3138.
convert.exe: missing an image filename `text.png' @ error/convert.c/ConvertImageCommand/2946.
Thanks for the quick reply, but it seems that my shell is not clever enough for that.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: append problem with more than 9 files
What are your actual file names? PNG does not support multiple frames. So you need to do something like what el_supremo suggested with the right frame indicators on the wildcard numbering for your images, if they are named appropriately.
Re: append problem with more than 9 files
I tried to use "box[10-21].png" instead, but got the same bad result. The only thing that worked is usingfmw42 wrote:What are your actual file names? PNG does not support multiple frames. So you need to do something like what el_supremo suggested with the right frame indicators on the wildcard numbering for your images, if they are named appropriately.
box[1,2,3,4,5,6,7,8,9,10,11,12].png
or even shorter (but harder to program)
box[1-9,10-12].png
Looks like a wildcard problem to me. Anyhow, I can live with this solution. Not that nice but ways better than writing out all picture names.
If someone has a better idea, please let me know.
Thanks!

- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: append problem with more than 9 files
PNG does not allow multi-frame images. So something is wrong. Again what are the actual file names if PNG, such as box1.png box2.png ... box12.png. If that is the case, then you should be able to do
convert box%d.png[1-10] +append result
this works for me (IM 6.6.5.0 Q16 Mac OSX Tiger)
convert rose: rose1.png
convert rose: rose2.png
convert rose: rose3.png
convert rose: rose4.png
convert rose: rose5.png
convert rose%d.png[1-3] +append rose_tmp.png
This I believe will append rose2, rose3, rose4 as the sequence numbers in parenthesis start with 0 for the first image in the command line.
convert box%d.png[1-10] +append result
this works for me (IM 6.6.5.0 Q16 Mac OSX Tiger)
convert rose: rose1.png
convert rose: rose2.png
convert rose: rose3.png
convert rose: rose4.png
convert rose: rose5.png
convert rose%d.png[1-3] +append rose_tmp.png
This I believe will append rose2, rose3, rose4 as the sequence numbers in parenthesis start with 0 for the first image in the command line.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: append problem with more than 9 files
My bad. I should have used %d - not %2d. I just tried this sort of thing in a DOS window on XP and it works.
Pete
Code: Select all
convert box%2d.png[1-12] +append allboxes.png
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
Re: append problem with more than 9 files
We have a bingo
convert box%d.png[1-12] +append allboxes.png
works here! I have to check the used index, but it should be no problem, as I create (and delete) all temporay box pictures at runtime.
Many thanks to both of you!!

convert box%d.png[1-12] +append allboxes.png
works here! I have to check the used index, but it should be no problem, as I create (and delete) all temporay box pictures at runtime.
Many thanks to both of you!!