'render identicon to PIL.Image
@param size identicon patchsize. (image size is 3 * [size])
@return PIL.Image'

def render(self, size):

    (middle, corner, side, foreColor, backColor) = self.decode(self.code)
    image = Image.new('RGB', ((size * 3), (size * 3)))
    draw = ImageDraw.Draw(image)
    draw.rectangle((0, 0, image.size[0], image.size[1]), fill=0)
    kwds = {'draw': draw, 'size': size, 'foreColor': foreColor, 'backColor': backColor}
    self.drawPatch((1, 1), middle[2], middle[1], middle[0], **kwds)
    kwds['type'] = side[0]
    for i in xrange(4):
        pos = [(1, 0), (2, 1), (1, 2), (0, 1)][i]
        self.drawPatch(pos, ((side[2] + 1) + i), side[1], **kwds)
    kwds['type'] = corner[0]
    for i in xrange(4):
        pos = [(0, 0), (2, 0), (2, 2), (0, 2)][i]
        self.drawPatch(pos, ((corner[2] + 1) + i), corner[1], **kwds)
    return image
