Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Manage IR's >

Image/Pixel-Color Operations

ANA.New - Create new, empty IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.New

Create new, empty Image-Register (IR) or create new IR with resized Content from other IR

 

 

Intention

 

This command will create a new IR with a specified resolution.

Generally the new IR will be empty (Black). If P4 is specified, then the content of IR P4 will be copied and resized to the resolution into the new IR.

 

1. Create new, empty IR

This will include all Screens on a Dual-Screen System. Here we search a Pattern on the complete Desktop.

 

STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager

ANA.Snap|0

ANA.show|0!

ANA.New|0|800|200

' As you can see, IR 0 is deleted and has the specified size

ANA.show|0!

ENR.

 

 

2. Create new IR and copy the resized Content of another IR

As you can see below, the Resizing will not take any Aspect-Ratio into account, but use the full X and Y Size of the new IR.

 

STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager

ANA.Snap|2

ANA.New|0|800|200|2

ANA.show|0!

ENR.

 

 

Resized_new 2

 

 

 

 

 

 

Syntax

 

ANA.New|P1|P2|P3[|P4]

 

Parameter Explanation

 

P1 - Image-Register Number for the IR that will be created. If there is Content in this IR, it will be deleted.

P2 - X-Resolution for the new IR Content

P3 - Y-Resolution for the new IR Content

P4 - opt. Image-Register Number, if specified, the Content of this IR will be resized and copied into the new IR. If omitted, an empty IR will be created.

 

The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".

 

 

Example

 

'***********************************

' ANA.New-Sample

'***********************************

STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager

ANA.Snap|0

ANA.BlockTo|0|1|5|2

ANA.New|0|800|300|1

ANA.show|0!

ENR.

 

 

' Here you can see the result of the Operation.

 

Resized_New

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: