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?