added ability to load image as legend