Well, the heightfield image itself comes from my terrain generator, and it is just a greyscale PNG. But to produce the contour maps in GIMP, I wrote a contour line script-fu, which draws a single contour line. Then the full contour map script-fu just draws a bunch of contour lines. It would work with any greyscale image that represented a heightfield.