possible bug in creating multiframe files IM 6.7.3.0
Posted: 2011-10-10T13:37:08-07:00
IM 6.7.3.0 Q16 Mac OSX Tiger
I am having trouble making an animation when using certain (GIMP created) images and saving the frames in IM as MIFF, PAM, TIFF before creating the animation. If I use -strip on the "bgimage" before processing then it works with PAM, etc. Here is an example using my pagecurl script to create frames and then a small script to animate them in GIF output.
image: (the problem image)
bgimage:
image="mandril3.png"
bgimage="gimp_256x256.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" PAM:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation.gif
convert: negative or zero image size `tmp.pam' @ error/pnm.c/ReadPNMImage/405.
With MIFF: I get the following error:
convert: no decode delegate for this image format `/var/tmp/magick-qW5O6k6U' @ error/constitute.c/ReadImage/532.
With TIFF: I get the following error:
convert: no decode delegate for this image format `/var/tmp/magick-UYGlw0kV' @ error/constitute.c/ReadImage/532.
To make the testing easier, I have split the process into two parts. The first part makes the PAM frames with no error. But when I try to display them I get similar error messages. It seems that the files are not saving the multiple frames.
image="mandril3.png"
bgimage="gimp_256x256.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" tmp.miff
done
http://www.fmwconcepts.com/misc_tests/a ... g/tmp.miff
http://www.fmwconcepts.com/misc_tests/a ... ug/tmp.pam
http://www.fmwconcepts.com/misc_tests/a ... g/tmp.tiff
What is it that -strip is removing that makes this work?
convert gimp_256x256.png -strip gimp_256x256_strip.png
image="mandril3.png"
bgimage="gimp_256x256_strip.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" pam:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation2.gif
NOTE also if swapping the order of the two images then it works fine also.
image="gimp_256x256.png"
bgimage="mandril3.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" pam:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation3.gif
I am having trouble making an animation when using certain (GIMP created) images and saving the frames in IM as MIFF, PAM, TIFF before creating the animation. If I use -strip on the "bgimage" before processing then it works with PAM, etc. Here is an example using my pagecurl script to create frames and then a small script to animate them in GIF output.
image: (the problem image)
bgimage:
image="mandril3.png"
bgimage="gimp_256x256.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" PAM:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation.gif
convert: negative or zero image size `tmp.pam' @ error/pnm.c/ReadPNMImage/405.
With MIFF: I get the following error:
convert: no decode delegate for this image format `/var/tmp/magick-qW5O6k6U' @ error/constitute.c/ReadImage/532.
With TIFF: I get the following error:
convert: no decode delegate for this image format `/var/tmp/magick-UYGlw0kV' @ error/constitute.c/ReadImage/532.
To make the testing easier, I have split the process into two parts. The first part makes the PAM frames with no error. But when I try to display them I get similar error messages. It seems that the files are not saving the multiple frames.
image="mandril3.png"
bgimage="gimp_256x256.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" tmp.miff
done
http://www.fmwconcepts.com/misc_tests/a ... g/tmp.miff
http://www.fmwconcepts.com/misc_tests/a ... ug/tmp.pam
http://www.fmwconcepts.com/misc_tests/a ... g/tmp.tiff
What is it that -strip is removing that makes this work?
convert gimp_256x256.png -strip gimp_256x256_strip.png
image="mandril3.png"
bgimage="gimp_256x256_strip.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" pam:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation2.gif
NOTE also if swapping the order of the two images then it works fine also.
image="gimp_256x256.png"
bgimage="mandril3.png"
for ((i=5; i<=105; i=i+10)); do
echo >&2 i=$i
pagecurl -a $i "$image" "$bgimage" pam:
done | convert \
-dispose background \
-delay 100 "$image" \
-delay 10 - \
\( -delay 10 -clone -1-1 \) \
-delay 100 "$image" \
-loop 0 -layers Optimize \
pagecurl_animation3.gif