Saturday, March 22, 2008

Inking It Up with Inkscape

A scientist does not live by photos alone. Often, it's nice to to include a little diagram, or line drawing, or composited photo collage, in your paper. In the world of commercial software, there are some really nice options out there, such as Adobe Illustrator and CorelDraw. Among open source problems, however, Inkscape takes the cake.

Inkscape is a vector illustrator - this means that rather than dealing with images as a set of pixels, it uses mathematical formulas to describe the curves, lines, text, and shapes that form the image. Thus, like Illustrator or Corel Draw, it's not intended for photos by themselves (see my previous post on GIMP for that flavor of software).

I have prepared a number of illustrations using Inkscape and have been immensely pleased so far. The user interface is pretty intuitive, and I can do most everything I want to do in preparing illustrations for publication. The image at right is one of the first diagrams I created with this program - any crudeness in the rendering is my fault, not Inkscape's! As you can see, it's easy to integrate lettering, shading, and line drawings or photos. Unlike some other open source programs, documentation for Inkscape is actually pretty good, too. There are even some handy tutorials at the program's Wiki page. Inkscape is under very active development (currently in versions 0.45.1, with 0.46 arriving soon), and is available in versions for Linux, Windows, and Mac.

Is Inkscape For You?
So, who would benefit most from Inkscape? I strongly recommend it for the average paleontologist, who needs to make figures for a few publications a year, or presentations, or whatever. The features are more than sufficient to do what you need to do (and you can't beat the [free] price tag!). Professional artists, or people who are married to Illustrator, may find it hard to make the switch to Inkscape. For instance, it's pretty much impossible at present to do color separations (as near as I can tell), which is a bit of a problem for those who need to regularly turn color into a printed copy. Those who primarily do their graphics for the web, though, will probably be in pretty good shape.

A Few Small Issues
The one area where I have been a little disappointed by Inkscape is in import and export. If you have files from a previous program, you may run into some problems. Inkscape only imports Illustrator back to version 8.0 (although see the notation below), and you're out of luck with importing directly from CorelDraw, DXF, or EPS (although you certainly can import indirectly via other formats). The only bitmap export format Inkscape does is PNG - it's not a problem, so much as an annoyance. You can always use another program to convert the PNG to JPEG, TIFF, or whatever other format you want. As for other export formats, Inkscape will do PDF, EPS, PS, and a few others. EPS is probably the most critical, because publishers often want their image files in this format. Yet, when I've had embedded images, I've also found that file size can get pretty enormous pretty quickly. Apparently, the next release of Inkscape (0.46, arriving within the next week or two) is supposed to improve PDF/Illustrator support greatly.

Tips and Tricks
In the original spirit of this blog, here are a few things that I've found or read about during my time with Inkscape.

1) As far as I can tell, you can't actually embed images into a document permanently. This means that they're linked - and if the source images move, this can create problems. To get around this, I usually create a directory for my Inkscape file, and a subdirectory with the photos that are going into the document. This way, I can move the whole directory around, and the links are never broken.

2) If you use arrowheads in your figures, but want them in a color other than black, follow this little hint. Select the path with the arrowhead or other marker whose color you want to change, and then go to Effects > Modify Path > Color Markers to Match Stroke. That should fix it! Unfortunately, you'll have to do this each time you modify the color of the stroke.

3) I've read (but haven't actually attempted myself) that exporting Illustrator files to a standard SVG format usually works pretty well for later importation into Inkscape. As mentioned above, Illustrator support is supposed to improve tremendously in the forthcoming release of Inkscape.

4) I learned that hard way that PDF and EPS and some other formats don't play well with bitmaps that have transparency layers (often found in PNG or GIF files). This is no fault of Inkscape's - just a consequence of the file format itself! So, it can be quite handy to use a path to clip out the portions of an object that you don't want overlapping with other objects.

The Bottom Line
For most "casual" users (meaning most paleontologists I know), Inkscape will do you quite fine. The die-hard graphics guru may want to give this a try, but probably won't be making the switch quite yet. Be aware of some quirks (read: limitations) with import and export, and look forward to substantial improvements in upcoming versions. Inkscape is a program that should continue to improve (it's not even to 1.0 yet!), and will hopefully join the ranks of "classic" open source programs such as GIMP and OpenOffice.org.

2 comments:

Anonymous said...

Hi Andy,

thnx for the great post!
Although I dont have the urgent need for such an application, I think I will gladly use it for my upcoming thesis.

Great find ;-)

Cheers,

Simon

Jakob Malm said...

Great post.

I can definitely recommend Inkscape to other scientific authors. I have used Inkscape a few years now, for all my illustration editing.

My field of science is analytical biochemistry, and we do a lot of figures...