Image.Import

LabTalk Object Type:

External

The image.import object provides script access for importing graphic image files.

Please see the impImage X-Function.

Methods:

Method Description
image.import.matrix(matrixName)

Import an image into a matrix. matrixName is the name of the destination matrix window. The source image file is specified in image.fileName$. Example:

image.fileName$ = Example.bmp;
image.import.matrix(Matrix1);
image.import.object(winName, objName, replace)

Add an image to a graph or a layout page.winName defaults to the active window. objName defaults to a DIB (Origin's internal default). replace 0 = no replacement (default); 1 = replacement. The position (and size) of the image must be managed by the user. The file can be any of the supported image file types. If you opt NOT to replace an existing object (replace = 0), then a new, enumerated object is created. If you DO opt to replace an existing object, then you need to refresh after the replacement. Note that the replacement actually deletes the old object and creates a new one of the same name. This means the location is not preserved. Example:

getfile *.bmp; // get a file 
image.filename$=%B%A; // need to setup the image object 
image.import.object(Graph1,MyObject,0); 
getfile *.bmp; // get another file 
image.filename$=%B%A; // need to setup the image object 
image.import.object(Graph1,MyObject,0); // do not replace - creates a "MyObject1" 
getfile *.bmp; // get another file 
image.filename$=%B%A; // need to setup the image object 
image.import.object(Graph1,MyObject,1); // replace MyObject 
doc -uw; // refresh to see the replacement