Add option to export graph as jpeg or png.

Option to save the graph as JPEG or PNG
To test the PR
 * View an image. Open the Measurement tool
 * Draw a line. Save and select
 * Go the Graph pane.
 * A line plot should be displayed. Export the graph as JPEG or PNG. Only the line plot should be exported.
 * Repeat the previous steps but this time with a rectangle.