The question of how best to drawings (graphs, charts, images, text layouts, etc) from scripts (AppleScript, Perl, Python) on Mac OS X comes up fairly regularly, and there are lots of options. The correct solution depends very much on the problem.
I have started to put together the following summary. Many of the packages I have never used, so if you have anything to add or correct about any of these packages, please let me know.
The list below is in alphabetical order.
Tool | Import |
Import Image |
Export |
Export Image |
Text | Drawing Primitives |
Image Primitives |
AppleScript 1 | Perl 1 | Python 1 |
---|---|---|---|---|---|---|---|---|---|---|
Adobe SVG Viewer | ? | ? | N/A | N/A | Yes | Yes | Yes | Yes2 | Yes2 | Yes2 |
AppleScript Studio | A framework that can use AppleScriptable tools | Yes | No | No | ||||||
CamelBones | A framework that can use Cocoa facilities | No | Yes | No | ||||||
DrawBot | Yes | Yes | Yes | Yes | Mac | Yes | Yes | No | No | Yes |
GD | No | Some | No | Some | Bitmap/TrueType | Yes | Yes | No | Yes | Yes |
GraphicConverter | Yes | Yes | Image | Yes | Yes | Yes | Yes | Yes | No | No |
gnuplot | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
Image Events | Yes | Yes | Image | Yes | No | No | Yes | Yes | No | No |
ImageMagick | Yes | Yes | Image | Yes | TrueType | Yes | Yes | No | Yes | Yes |
Imager | No | Some | No | Some | Non-Mac | Yes | Yes | No | Yes | No |
iMagine Photo | Yes | Yes | No | Yes | Mac | Yes | Yes | Yes | No | No |
Matplotlib | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? |
NodeBox | Yes | Yes | Yes | Yes | Mac | Yes | Yes | No | No | Yes |
OmniGraffle | Yes | Yes | Yes | Yes | Mac | Yes | Yes | Yes | No | No |
PhotoShop | Yes | Yes | Image | Yes | Mac | Yes | Yes | Yes | No | No |
PyObjC | A framework that can use Cocoa facilities | No | No | Yes | ||||||
Sketch | ? | ? | Yes | TIFF | Mac | Yes | ? | Yes | No | No |
Smile | Yes | Yes | Yes | Yes | Mac | Yes | Yes | Yes | No | No |
TclOSA | No | No | Yes | No | Mac | Yes | Yes | Tcl | No | No |
http://camelbones.sourceforge.net/
http://www.graphicconverter.net/
GraphicConverter is a high-level bitmap image manipulation program.
http://www.develop-help.com/imager/
http://www.yvs.eu.com/imagine.html
http://matplotlib.sourceforge.net/
Matplotlib produces plots and graphs.
http://www.omnigroup.com/applications/omnigraffle/
http://www.adobe.com/products/photoshop/main.html
Photoshop is a powerful high-level bitmap image manipulation program.
https://pythonhosted.org/pyobjc/
PyObjC provides an Objective-C bridge for Python onto the Cocoa system API. Cocoa includes low-level vector/bitmap/text drawing primitives and much more.
/Developer/Applications/Utilities/Built Examples/Sketch.app
http://www.satimage.fr/software/en/index.html