<< 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.Load
Load an Image-Register (IR) from diskfile, using original size or "Load-Stretch"
Intention
This command will Load an specified IR from a diskfile.
It is the counterpart to "ANA.Save".
This will Save IR 0 and Load it back into IR 1.
ANA.New|0|640|400
ANA.vgradient|0|&HFF1010|&H10FFFF
ANA.show|0
VAF.$$FIL=?path\Myfilename.png
' This will Save IR 0 to $$FIL
ANA.Load|0|$$FIL
'LEN.$$CON|$$LEN
' We will Load it back into IR 1
ANA.Load|1|$$FIL
' We display the IR 1
ANA.invert|1
ANA.show|1!
ENR.
You can omit the Parameters then Filename will be "?pattern\BM_0.bmp".
If you specify the IR-Number ANA.Load|4, then the Filename will be "?pattern\BM_4.bmp"
If you just write
ANA.Load|1|<Filename>
then the filename will be expandet to
ANA.Load|1|?pattern\<Filename>.bmp
which is ?path\Pattern\<Filename>.bmp
If you specify P3, the Image will be stretched to the size of the specified IR.
In the Sample below we specify IR 1 in P3 so we get the size of the new created IR.
ANA.New|0|640|400
ANA.vgradient|0|&H10FF10|&H10FFFF
ANA.show|0
' This will Save IR 0 to $$FIL
VAF.$$FIL=?exeloc\BM_0.bmp
ANA.Save|0|$$FIL
ANA.new|1|1024|600
' We will Load it back into IR 1 using Stretch-Mode
ANA.Load|1|$$FIL|1
' We display the IR 1
'ANA.invert|1
ANA.show|1!
ENR.
The ANA.Load supports these File-Extensions:
•BMP
•EMF
•JPG or JPEG
•GIF
•ICO
•PNG
•TIF or TIFF
•WMF
When you start the Script from an SPR-Editor that has NO Admin-Rights, you may not be able to load pictures
from the Standard Robot path because its below C\Programme (x86)\ and you need Admin-Access to load files there.
As a result you will get only BLACK PICTURES using ANA.Load.
So if you only get Black Pictures, try to use ADMIN-RIGHTS for the Script.
Syntax
ANA.Load[|P1][|P2][|P3]
Parameter Explanation
P1 - opt. Image-Register number, if omitted, IR 0 will be used.
P2 - opt. File-Path and Filename, if omitted "?exeloc\BM_(IR-Number).bmp" will be used.
P3 - opt. Image-Register number, if given, the Image will be streched to the size of the Content of that IR.
The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".
Example
'***********************************
' ANA.Load/Load-Sample
'***********************************
ANA.New|0|640|400
ANA.vgradient|0|&H10FF10|&H10FFFF
ANA.show|0
' This will Save IR 0 to $$FIL
VAF.$$FIL=?exeloc\BM_0.bmp
ANA.Save|0|$$FIL
ANA.new|1|1024|600
' We will Load it back into IR 1 using Stretch-Mode
ANA.Load|1|$$FIL|1
' We display the IR 1
ANA.invert|1
ANA.show|1!
ENR.
Here you can see the result of the Operation.
Remarks
-
Limitations:
-
See also:
•