CImage:DimEq
The DimEq method returns true if a test image has the same number of columns and rows as the current image.
bResult = CImage:DimEq( CImage Test )
This method compares the dimensionality of two images, which involves comparing the pixel count along the first two axes (column and row axes). The data types are not compared, but something like
if ( I1:Datatype() == I2:Datatype() ) then (...) end
may be used to test the data type for equality.
The following script fragment compares 2 images in files sPath1 andsPath2 for equal number of rows and columns:
|
-- create image 1 |
|
-- open image 1 |
|
-- create image 2 |
|
-- open image 2 |
|
-- compare the dimensions |
|
-- announce that they are equal |
|
|
|
|
|
|
Related Topics