How to automate GIF to PNG with Preview using AppleScript

applescriptpreview

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?

Best Answer

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.