<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Load/Save-Import/Export IR's > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.ToVar
Transfer Image-Register (IR) Content into SPR-Variable
Intention
This command will transfer the IR Content into a SPR Variable. From there you can save it to disc, manipulate it yourself, or just keep it.
Using "FromVar" you can later transfer it back into an IR.
Putting a IR into a Variable using "ToVar" will produce a Variable with this format insider the Variable:
- 8 Byte (4 Byte X- and 4 Byte Y-Size Information)
- (X-size * y-size)*4 Byte per Pixel-graphical Data in BGR-Order.
1. Use ToVar with IR 0 and store Content on TOS
This will use IR 0 and store the Content on TOS.
STW.ct|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS|Desktops-Manager (c) 2020 Theo Gottwald
' We Snapshot the Desktop into IR 0
ANA.Snap|0
' This will use IR 0 and TOS because no parameter were given.
ANA.ToVar
' Here we get the TOS into the Variable
POP.$$CON
' We put the COntent into IR 1
ANA.#FromVar|1|$$CON
' We display the IR 1
ANA.show|1!
ENR.
2. Use ToVar with Parameters
This will include all Screens on a Dual-Screen System. They will be saved as a single ".bmp" (BItmap-) File. You can choose any widely used picture format, for example ".png" or "Jpg".
STW.ct|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS|Desktops-Manager (c) 2020 Theo Gottwald
' We Snapshot the Desktop into IR 0
ANA.Snap|0
' This will use IR 0 and TOS because no parameter were given.
ANA.ToVar|0|$$CON
' We put the Content into IR 1
ANA.#FromVar|1|$$CON
' We display the IR 1
ANA.show|1!
ENR.
Syntax
ANA.ToVar|[|P1]
Parameter Explanation
P1 - opt. Image-Register number, if omitted, IR 0 will be used.
The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".
Example
'***********************************
' ANA.ToVar/FromVar-Sample
'***********************************
ANA.New|0|640|400
ANA.vgradient|0|&HFF1010|&H10FFFF
ANA.show|0
' This will use IR 0 and TOS because no parameter were given.
ANA.ToVar|0|$$CON
'LEN.$$CON|$$LEN
' We put the COntent into IR 1
ANA.#FromVar|1|$$CON
' We display the IR 1
ANA.invert|1
ANA.show|1!
ENR.
Remarks
-
Limitations:
-
See also: