<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Debug & Show IR's > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.Show
Display Content of an Image-Register (IR)
Intention
This command will display the content of an Image-Register. It will stay open as long as the Script runs.
Optionally it will wait for a "Confirmation" to close the Display-Window.
You can currently display only 1 IR at a time.
1. Generate a Gradient and then display it using Show
' Here we have a Sample-Script
ANA.New|0|800|400
ANA.vgradient|0|&HFF0000|&H00FFFF
ANA.Show|0!
ANA.New|1|800|400
ANA.hgradient|1|&H00FFFF|&HFF0000
ANA.Show|1!
ANA.blendTo|0|1|2|160
ANA.Show|2!
ANA.VFlip|2
DMP.6
ANA.Show|2!
ENR.
If you add a "!" to the Show Command, this window will appear.
If you press "Yes" then the Script will continue running, and the Graphics-Window will be closed.
If you press "No", the Script will end.
2. Capture Window and scale/Stretch it using "New" then display it using show
ANA.Show will not do any scaling from itself. It will display the content of the IR 1:1.
If you want to do a scaling, you can use other commands like "New" or "EqualRes" first.
STW.ct|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS|Desktops-Manager
ANA.Snap|0
' Create New IR with 800x600 Resolution, then "stretch" IR 0 into this one
ANA.New|1|800|600|0
' Display the stretched picture
ANA.Show|1!
ENR.
Syntax
ANA.Show[|P1][!][@][#]
Parameter Explanation
P1 - opt. Image-Register number, if omitted, IR 0 will be used.
If the Snapshot worked fine, a "1" is returned on the TOS.
If Windows is unable to reserve the Memory for the Screenshot-Operation, the operation will fail and the command will return "0" on TOS.
If you add a "!" immediately after P1, then a Message-Box will appear and you can stop the Script and take closer Look.
If you add a "@" immediately after P1, then the result will be already filtered with a internal Fuzzy Logic. The effects may not be visible without a Lens.
If you add a "#" immediately after P1, then the Picture will be scaled to 512 Pixels using a internal logic that helps you preview the picture.
Example
'***********************************
' ANA.Show-Sample
'***********************************
STW.ct|Progman|Program Manager
ANA.snap|0
ANA.Copy|0|1
ANA.BlockTo|0|0|2
ANA.rct|0|&H0|260|&H0
ANA.rct|0|&HFFFFFF|200|&HFFFFFF
ANA.logic|0|1|0|A XOR B NOT T|RGB
ANA.rct|0|&H0|260|&H0
ANA.rct|0|&HFFFFFF|200|&HFFFFFF
ANA.show|0!
ENR.
Here you can see the result of the Operation.
Remarks
Putting a Screenshot inside 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.
Limitations:
-
See also:
•