code: public BufferedImage createLegendImage(boolean withBytePlot,
  			boolean withEntropy, boolean withPEStructure) {
  		image = new BufferedImage(legendWidth, height, IMAGE_TYPE);
  		drawLegend(withBytePlot, withEntropy, withPEStructure);
  		assert image != null;
  		assert image.getWidth() == legendWidth;
  		assert image.getHeight() == height;
  		return image;
  	}
docs: Creates a buffered image with a basic Legend
  
  @param withBytePlot
  show byteplot legend
  @param withEntropy
  show entropy legend
  @param withPEStructure
  show PE structure legend
  @return buffered image of the generated legend