add
The add function adds a value to a CImage object or 1-dimensional array.
Whereas this function operates on a pure (indexed) array, the slightly slower addn function operates on a general table that may be a multi-dimensional array or contain a mixture of numbers, strings, named keys, and sub-tables.
result = add( object, value )
where object is a 1-dimensional array, CImage object, or single number.
value is a number.
result is returned as an array, CImage object, or number, depending on the type of value.
The following script adds 3200.5 to all members of a table.
|
-- add the number to all members of the table |
The next script adds 3200.5 to all pixels of a CImage.
|
-- attach the topmost image window |
|
-- make sure an image window is on top |
|
-- add the value to the CImage |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.