<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Change Resolution > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.GetRes
Get X- and Y- Resolution and the total number of Bytes of the specified Image-Register (IR)
Intention
This command will get the X- and the Y- Resolution of the specified IR.
It will also get the total number of Bytes of this IR.
1. Use ANA.GetRes with the Stack
This will use ANA.GetRes with the Stack.
STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager
ANA.Snap|0
ANA.GetRes|0
DMP.6
MBX.!
ENR.
The Stack will look like this:
On TOS is the X-Resolution, followed by the Y-Resolution. Then the total Number of Bytes in the specified IR. This generally X+Y*4.
2. Use ANA.GetRes with Variables
This will directly place the results in Variables. On the TOS there will be only a "1", or a "0" in case of error.
STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager
ANA.Snap|0
ANA.GetRes|0|$$XPO|$$YPO|$$SIZ
DMP.6
MBX.$$XPO,$$YPO---$$SIZ
MBX.!
ENR.
Syntax
ANA.GetRes|[|P1][|P2][|P3][|P4]
Parameter Explanation
P1 - opt. Image-Register number, if omitted, IR 0 will be used.
P2 - opt. Variable that will receive the X-Resolution, if omitted, TOS will be used.
P3 - opt. Variable that will receive the Y-Resolution, if omitted, TOS will be used.
P4 - opt. Variable that will receive the Size of the IR in Bytes, if omitted TOS 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.GetRes-Sample
'***********************************
' Will get Desktop-Resolution
STW.ct|Progman|Program Manager
ANA.Snap|0
ANA.GetRes|0|$$XPO|$$YPO|$$SIZ
DMP.6
MBX.$$XPO,$$YPO---$$SIZ
MBX.!
ENR.
Remarks
-
Limitations:
-
See also:
•