Page 1 of 1
append animation - windows 7
Posted: 2015-10-31T06:30:13-07:00
by sidora
Hi,
I use imagemagick to append animation frames, and just switched from mac to windows.
On mac i used to list all frame numbers in a curly bracket like this:
convert animation_{0,1,2,3,4,5,6,7,8,9,10,11,12}.png -append animation.png
On windows this doesnt work. i get an error.
i tried this on windows: convert animation_[0-12].png -append animation.png
But this only seems to work for 0 to 9 (10 frames max).
Most of my animations are hundreds of frames and i would like a good way to append without listing the frames one by one (e.g. animation_1.png animation_2.png etc)
Does anyone knows a good way to easily append a list of numbered files? Thanks
Re: append animation - windows 7
Posted: 2015-10-31T07:19:53-07:00
by snibgo
I think curly brackets {a,b,c} is a feature of bash that Windows cmd doesn't have. You can install bash and other Unix tools on Windows, if you want, from Cygwin.
I always use leading zeros in frame names. I use six digits as five isn't enough for one hour.
For example, generating frames, Windows BAT syntax:
Code: Select all
for /L %%N in (0,1,19) do (
set LZ=000000%%N
set LZ=!LZ:~-6!
convert rose: fr_!LZ!.png
)
Reading frames, bash syntax:
Code: Select all
convert fr_{000007,000008,000009,000010,000011}.png +write info: f.tiff
fr_000007.png[0] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.001
fr_000008.png[1] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.002
fr_000009.png[2] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.002
fr_000010.png[3] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.003
fr_000011.png[4] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.003
Re: append animation - windows 7
Posted: 2015-10-31T07:36:19-07:00
by sidora
Installed Bash, and now the curly brackets works
Thanks!
i really wish something like this: convert animation_[0-127].png would work..
Would be so easy:P
Re: append animation - windows 7
Posted: 2015-10-31T08:12:45-07:00
by snibgo
I think the [a-b] expansion is by ImageMagick. It would be useful if it worked for multi-digit numbers. Perhaps it is supposed to, but has a bug.
In bash, we can use {a..b}, eg:
Code: Select all
convert fr_{7..11}.png +write info: f.tiff
fr_7.png[0] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.002
fr_8.png[1] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.001
fr_9.png[2] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.003
fr_10.png[3] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.006
fr_11.png[4] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.008
convert fr_{000007..000011}.png +write info: f.tiff
fr_000007.png[0] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.002
fr_000008.png[1] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.003
fr_000009.png[2] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.005
fr_000010.png[3] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.008
fr_000011.png[4] PNG 70x46 70x46+0+0 8-bit sRGB 0.000u 0:00.009
Re: append animation - windows 7
Posted: 2015-10-31T08:36:30-07:00
by sidora
snibgo wrote:I think the [a-b] expansion is by ImageMagick. It would be useful if it worked for multi-digit numbers. Perhaps it is supposed to, but has a bug.
In bash, we can use {a..b}, eg:
Code: Select all
convert fr_{7..11}.png +write info: f.tiff
Nice!! Thanks a lot!