Generate legend images