Export Graph to Image File
Origin allows users to export graphs to several different image file types. Origin C allows access to this ability using the global export_page and export_page_to_image functions.
The following example will export all the graphs in the project to EMF files. The EMF file names will be the same as the graph names, and will be located in the root of drive C.
foreach(GraphPage gp in Project.GraphPages)
export_page(gp, strFileName, "EMF");
The next example will export the active graph to an 800x600 JPEG file. The JPEG file name will be the name of the graph and will be located in the root of drive C.
gp = Project.ActiveLayer().GetPage();
if( gp ) // if active page is a graph
export_page_to_image(strFileName, "JPG", gp, 800, 600, 8);