CImage:Create
The Create method constructs a new image of specified properties and attaches it to the CImage object. Until saved, the image is not associated with any file. The image should be removed from memory using the class methods Close or delete.
bTrue = CImage:Create( nCols, sDatatype ) bTrue = CImage:Create( nCols, nRows, sDatatype ) |
nCols is the number of columns in the image.
nRows is the number of rows in the image if 2 dimensional.
sDatatype is a string that describes the image pixel type (e.g., "16 bit unsigned")
On success, this method returns true.
On failure, this method returns false.
The image is created with the pixel values set to 0. You can change all, most, or some of the pixel values using the SetRegionVal and SetVal methods.
|
-- create a CImage object |
|
-- Create a 100x200 image of type "ushort" |
|
-- if not created, then... |
|
-- leave the script, etc. |
|
-- end of if block |
|
-- to change the pixel values |
CImage class, Open, Copy, new_image, attachlist_image
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.