CImage:DimEq


The DimEq method returns true if a comparison image has the same lengths in all dimensions.

Syntax

bSuccess = CImage:DimEq( CImage )

where

    CImage is the comparison image.

    bSuccess is the returned success code. If the dimensions are identical, it is true, otherwise false.

  

This method compares the dimensions of two images, axis by axis. The data types are not compared. To compare two images based on their pixel values, use the ==, >=, or > math operator.

Example

The following script compares 2 images in files sPath1 andsPath2 for equal dimensions:

I1 = CImage:new()

-- create image 1

I1:Open(sPath1)

-- open image 1

I2 = CImage:new()

-- 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

 

Related Topics

Len

Datatype

Math Operators

CImage class