CImage:DimEq


The DimEq method returns true if a test image has the same number of columns and rows as the current image.

Syntax

bResult = CImage:DimEq( CImage Test )

Remarks

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

Example

The following script compares 2 images in files sPath1 andsPath2 for equal number of rows and columns:

I1 = new_image()

-- create image 1

I1:Open(sPath1)

-- open image 1

I2 = new_image()

-- create image 2

I2:Open(sPath)

-- open image 2

if I1:DimEq(I2) then

 -- compare the dimensions

  Msg("Equal Dimensions")

-- announce that they are equal

end

 

I1:delete()

 

I2:delete()

 

Related Topics

CImage class, Cols, Rows, PixelType


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.