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 )
Test is the comparison image.
On success, this method returns true if the dimensions are the same.
If the dimensions are different, or Test is invalid, this method returns false .
This method compares the dimensionality of two images, which involves comparing the pixel count along each of the first two axes (columns and rows). The pixel types are not compared, but you can also compare the pixel type using something like this:
if I1:PixelType() == I2:PixelType() then
-- do something
end
The following script 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 |
|
|
|
|
|
|
CImage class, Cols, Rows, PixelType
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.