<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > RGB- and HLS-Operations > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.SplitRGB
Split Image-Register (IR) Content into R,G and B-Part
Intention
This command will Split the Content of an given IR into R,G and B-Part each in separate Image-Registers.
For further use.
1. Split Picture in R,G and B-Parts
SplitRGB is technically the Opposite then the ANA.MixRGB - Command.
You can NOT just swap the R,G and B - IR's and re-combine them. If you want to Swap R,G and B-Parts use the ANA. Mix_???-Commands for that.
$$FIA=?pattern\SarahC_640.jpg
ANA.Load|0|$$FIA
ANA.SplitRGB|0|1
ANA.Show|1!
ANA.Show|2!
ANA.Show|3!
ENR.
Picture 1: Original in IR 0 Picture 2 in IR 1 Picture 3 in IR 2 Picture 4 in IR 3
->++
Syntax
ANA.SplitRGB[|P1][|P2][|P3][|P4][|P5]
Parameter Explanation
P1 - opt. Source Image-Register number, if omitted, IR 0 will be used.
P2 - opt.Destination R Image-Register number, if omitted, IR P1+1 will be used.
P3 - opt Destination G Image-Register number, if omitted, IR P2+1 will be used.
P4 - opt Destination B Image-Register number, if omitted, IR P3+1 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.SplitRGB and MixRGB-Sample
'
'***********************************
$$FIA=?pattern\SarahC_640.jpg
ANA.Load|0|$$FIA
ANA.SplitRGB|0|1
ANA.Show|1!
ANA.Show|2!
ANA.Show|3!
' Now mix the 3 Parts together in IR 6
ANA.MixRGB|6|1
ANA.Show|6!
ENR.
Remarks
-
Limitations:
-
See also:
•