Export a graph's flip-through images to a video or multi frame image.
int ExportMultiFrame( LPCSTR pcszFileName, LPCSTR pcszType, int nWidth, int nHeight, LPVOID pOptions = NULL, LPVOID pFlipOpts = NULL )
0 if success
EX1
#include <../Originlab/GraphicalExport.h> void GraphPage_ExportMultiFrame_ex() { GraphPage gp = Project.Pages(); string strFileName = GetAppPath() + gp.GetName() + ".avi"; double dWdith; RECT rect; compute_page_export_inch(gp, 1, dWdith, TRUE, &rect); int nDPI = 600; int width = (int)convert_size_to_specified_unit(dWdith, UNIT_INCH, UNIT_PIXEL, nDPI); int height = (int)round(RECT_HEIGHT(rect) * width / RECT_WIDTH(rect), DEFAULT_DECIMAL_PLACES); OVideoOptions_t vidOpts; vidOpts.nCodec = 0; vidOpts.dFPS = 1; LPVOID pOpts = NULL; pOpts = &vidOpts; OFlipOptions_t flip; flip.nShift = 1; int err = gp.ExportMultiFrame(strFileName, "avi", width, height, pOpts, &flip); if (err == 0) out_str(strFileName); else out_str("fail"); }
origin.h