error when creating animated GIF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
zenjim
Posts: 4
Joined: 2019-05-12T11:44:14-07:00
Authentication code: 1152

error when creating animated GIF

Post by zenjim »

Hi,

I used the procedure in the following url to create an animated GIF from png images created in POV-Ray:
http://jacobsalmela.com/2015/11/02/make ... ght-click/

it makes a macOS workflow that allows you to select a group of image files, right click on them, then click 'Make Animated GIF'.
It uses the following command:
/usr/local/bin/convert -delay 20 -loop 0 "$@" ~/Desktop/animated.gif

but when I run it, it gives the following error:

The action “Run Shell Script” encountered an error: “/Users/jim/Desktop/POVRay files/camera201.png: line 1: $'\211PNG\r': command not found
/Users/jim/Desktop/POVRay files/camera201.png: line 2: $'\032': command not found
/Users/jim/Desktop/POVRay files/camera201.png: line 3: $'\rIHDR\004\003\b\0025\330\202Z\004gAMA\261\217\v\374a\005\001sRGB\256\316\034\351\003sBIT\b\b\b\333\341O\340': command not found
/Users/jim/Desktop/POVRay files/camera201.png: line 3: $'1\256\272\325\001#tEXtSoftwarePOV-Ray': command not found
/Users/jim/Desktop/POVRay files/camera201.png: line 4: Platform:: command not found
/Users/jim/Desktop/POVRay files/camera201.png: line 5: syntax error near unexpected token `('
/Users/jim/Desktop/POVRay files/camera201.png: line 5: `Compiler: 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)'”


any ideas what's going on and how to fix it?

thanks!
zenjim
Posts: 4
Joined: 2019-05-12T11:44:14-07:00
Authentication code: 1152

Re: error when creating animated GIF

Post by zenjim »

this is odd. I tried it at the command line using the following:
$ /usr/local/bin/convert -delay 20 0loop 0 ~/Desktop/POVRay\ files/camera2*.png ~/Desktop/animated.gif

and it got the following error but still created the animated.gif file:
convert: unable to open image '0loop': No such file or directory @ error/blob.c/OpenBlob/3497.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '0': No such file or directory @ error/blob.c/OpenBlob/3497.
convert: unable to open image '0': No such file or directory @ error/blob.c/OpenBlob/3497.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: error when creating animated GIF

Post by fmw42 »

You have "0loop 0". Why is there a "0" at the beginning of that? It should be -loop 0
zenjim
Posts: 4
Joined: 2019-05-12T11:44:14-07:00
Authentication code: 1152

Re: error when creating animated GIF

Post by zenjim »

typo on my part. I just corrected it and tried again and it works fine.

any insight as to why my Automator workflow in my original post isn't working?
zenjim
Posts: 4
Joined: 2019-05-12T11:44:14-07:00
Authentication code: 1152

Re: error when creating animated GIF

Post by zenjim »

I fixed it! I didn't see that I had to specify the Shell in the Automator workflow. It didn't say to do that in the instructions but did have it in the final example screenshot. problem solved and works great! :D
Post Reply