Generate legend images

fix #139