# Simple gd program from gd import * im = gdImageCreate(64,64) black = gdImageColorAllocate(im,0,0,0) white = gdImageColorAllocate(im,255,255,255) gdImageLine(im,0,0,63,63,white) out = fopen("test.gif","w") gdImageGif(im,out) fclose(out) gdImageDestroy(im) print "Wrote test.gif"