1

I would like to be able to quickly convert images to GIF as it can compress line art images much more than PNG or JPEG. The fastest way to convert is an Automator Service, and Automator does indeed offers a neat Change Type of Image function that you can drag and drop into the Service. The problem is that it does not allow GIF as output.

So, I thought I'll try myself on a little Terminal command. It works but at first I didn't get the extensions right and had to hunt around StackExchange for the right command to add.

Now, the only question I have left is whether I can reduce the number of colors using sips. By default it uses the full 256 color space. That is much more than necessary for most schematics. Tuning that down would make for a much smaller image. The sips documentation shows a parameter called space but I have no idea whether that refers to what I need or whether sips even does that. If not are there any alternatives that can be used in a terminal loop?

  • 1
    You do not need to use the mv command, just change the sips command line to: /usr/bin/sips -s format gif "$f" --out "${f%.*}.gif" – user3439894 Oct 7 '16 at 1:38
  • 2
    Maybe you should give a try to ImageMagick. You can install it with brew. – Ortomala Lokni Oct 8 '16 at 16:26
  • ImageMagick looks promising especially since it has various command line tools. – SeanJ Oct 10 '16 at 9:06

You must log in to answer this question.

Browse other questions tagged .