2

I have a GIF file but I can open it only with Preview because it is a little bit ruined (GIMP or other programs does not open it correctly but it works with Preview).

I want to export it to PNG files. As far as I know the only way to do it is:

  1. Manually select the next frame
  2. File → Export
  3. Choose the right format to export and specify the path
  4. Click Save and repeat

I'd like to automate it. Some advice?

2 Answers 2

1

You would have to use something like php, or a workflow.

There are no AppleScript dictionaries for Preview. Which means you would not be able to do it in AppleScript.

2
  • "There are no AppleScript dictionaries for Preview." this is the answer!
    – nkint
    Nov 23, 2013 at 14:02
  • 1
    Preview has actually had a basic AppleScript dictionary by default since 10.9, but there is no "Preview suite" or no commands for manipulating images.
    – Lri
    Nov 23, 2013 at 14:05
2

You could also try using ImageMagick:

convert -coalesce animation.gif frame%04d.png

You can install ImageMagick with brew install imagemagick or sudo port install imagemagick.

2
  • Although this doesn't involve Preview as per the OP's question, this will solve your problem. .
    – wrossmck
    Nov 23, 2013 at 17:11
  • Probably this automation can be done in GraphicConverter as well. But still, that is not Preview as required.
    – GEdgar
    Nov 23, 2013 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .