<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Convert Colors > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.Contrast
Change Contrast in an Image-Register (IR)
Intention
This command will change the contrast value of an IR. The given P2 value can be positive or negative.
Negative values for P2, will decrease the contrast. If P3 is given, then the result will be stored in IR P3.
1. Change color Contrast in IR
In this case we do not specify P3 therefore we will directly change the Original IR that contains the picture.
VAF.$$PIA=?exeloc\Sara2.jpg
NEF.$$PIA
MBX.No such file.
ENR.
EIF.
ANA.Load|0|$$PIA
ANA.cow|0|64|1
ANA.Show|1!
ANA.Contrast|1|2000
GSB.Save|1
ANA.Contrast|1|1000
ANA.Show|1!
ANA.Contrast|1|-500
ANA.Show|1!
ENR.
Here is another Sample Picture.
Original Picture ANA.Complement
Contrast Calculation are fast and will be done mostly in less then 1 Second.
Syntax
ANA.Contrast|P1|P2[|P3]
Parameter Explanation
P1 - Source Image-Register Number, Source-IR, if omitted, IR 0 will be used.
P2 - (number, -16000 to +16000) Contrast Value, positive values will increase the contrast, negative values will decrease the contrast.
P3 - Destination Image-Register Number, if omitted, IR P1 will be used as destination 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.Contrast-Sample
'***********************************
VAF.$$PIA=?exeloc\Sara2.jpg
NEF.$$PIA
MBX.No such file.
ENR.
EIF.
ANA.Load|0|$$PIA
ANA.Show|0!
ANA.Contrast|0|-500
ANA.Show|0!
ANA.Contrast|0|2000
ANA.Show|0!
ENR.
Remarks
-
Limitations:
-
See also: