Monday, February 25, 2013

Adding photography grid lines in GIMP

In photography, the "Rule of thirds" suggests places for optimal visual interest. You divide the photo into nine equal parts, like a tic-tac-toe board. The rule says that the most important visual elements must be at the dividing lines, or along the lines of the tic-tac-toe. This is an easy rule, and helps to determine how best to crop an image, or to judge a composition.

GIMP, the free image editor, allows the user to create guide lines. These are lines shown for reference while editing an image. They do not modify the underlying image, and can be dragged out from the ruler or created using a menu item. Gimp also allows certain edits to stick to guide lines. This is useful if you are adding text, or adding layers as it makes it easy to align visual elements in an appealing manner.

I find it helpful to create rule of thirds guide lines to evaluate photographs. Rather than manually drag out guide lines, I have written a GIMP script to automatically create such rule-of-thirds guide lines. This is what the result looks like.

To use, download the rule-of-thirds script and copy it to your local scripts directory. On my machine, this is $HOME/.gimp-2.6/scripts. The exact location depends on your platform (Windows/Linux/Mac) and Gimp version. You can find out the exact location by going to [Menu] -> Edit -> Preferences -> Folders -> Scripts.

Now start gimp and navigate to [Menu] -> Filters -> Script-Fu -> Refresh scripts.

Once it is refreshed, the rule of thirds guide lines should be available under [Menu] -> Images -> Guides -> Photography.