Image.Export

LabTalk Object Type:

External

The image.export object provides script access for exporting graphs to graphic files. It also provides script access for exporting a matrix to a raster graphic image file.

Please see the expImage X-Function.

Properties:

Property Access Description
image.export.tempRaster Read/write,
numeric

When exporting to a raster format, Origin creates a temporary image that will be converted to the destination image by the third-party library. Origin can pass an EMF or a BMP to the third-party library. Each format has its advantages and disadvantages. This property specifies which format to use. 0 = EMF, 1 = BMP, 2 = BMP first, if BMP not successful then EMF. Option two (2) exists because high resolution BMPs can quickly consume a lot of memory and Windows 95 and 98 are limited to 16MB BMPs in memory. If the BMP fails to be created then Origin will try an EMF.

image.export.vectorKeepSize Read/write,
numeric

When exporting vector formats, Origin will pass an EMF to the third-party library. EMFs and WMFs are created using the Copy/Export Page Settings on the Page tab of the Options dialog box. If image.export.vectorKeepSize is 0 then the metafile is created using the settings in the dialog box. If image.export.vectorKeepSize is 1 then the metafile is created using the following settings: Ratio = 100, system.copyPage. ratio = 100. Margin Control = Page, system.copyPage.closeness = 2. Advanced On (Simple off), system.copyPage.advanced = 1. Keep Size On (Set Resolution off), system.copyPage.advKeepSize = 1

Methods:

Method Description
image.export.matrix(matrixName, imageType)

Export a matrix window to a raster gray scale image. matrixName is the name of the matrix window to export. imageType is the destination image type. The destination file name is specified in image.fileName$. Example:

Image.FileName$ = "myimage.bmp";
Image.Export.Matrix(Matrix1, BMP);
image.export.pageDPI(imageType, dotsPerInch, bitsPerPixel, compression)

Export the active graph or layout window to an image using a dots per inch resolution. bitsPerPixel is the color depth. Not all image types support all color depths. If the color depth specified is not supported by the specified image type, then Origin will use the best matching color depth supported by the specified image type. compression is the type of compression to use. Not all formats support compression. JPG can be from 2 to 255. TIF can be 0 = none, 1 = packbits, 2 = LZW (if enabled). The destination file name is specified in image.fileName$. Example:

Image.FileName$ = "myimage.bmp";
Image.Export.PageDPI( BMP, 96, 24, 0 );
image.export.pagePixel(imageType, widthInPixels, heightInPixels, bitsPerPixel, compression)

Export the active graph or layout window to an image using a width and height in pixel resolution. bitsPerPixel is the color depth. Not all image types support all color depths. If the color depth specified is not supported by the specified image type, then Origin will use the best matching color depth supported by the specified image type. compression is the type of compression to use. Not all formats support compression. JPG can be from 2 to 255. 2 is high quality, low compression. 255 is low quality, high compression. TIF can be 0 = none, 1 = packbits, 2 = LZW (if enabled). The destination file name is specified in image.fileName$. Example:

Image.FileName$ = "myimage.bmp";
Image.Export.PagePixel( BMP, 640, 480, 24, 0 );