div


The div function divides the pixels of a CImage object or 1-dimensional array by a value.

Syntax

result = div( object, value )

bullet.gif    where object is a 1-dimensional array, CImage object.

bullet.gif    value is a number.

bullet.gif    result is returned as an array, CImage object, or number, depending on the type of value.

Examples

The following script divides the members of a table by the value 3200.5.

t = div( tbl, 3200.5 )

-- diivide all members of the table by the number

  

The next script divides all pixels of a CImage by 3200.5.

V = AttachView( "CImageView" )

-- attach the topmost image window

Assert( V and V:Count() > 0 )

-- make sure an image window is on top

div( V:GetImage(), 3200.5 )

-- divide the CImage by the number

Related Topics

Table and Array Functions


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