Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Blit-Operations >

Image/Pixel-Color Operations

ANA.BlendTo - Blend multiple IR's into another IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.BlendTo

Blend multiple Image-Register's (IR) in different ways.

 

 

Intention

 

This command will combine/mix two IR's in specified strength for each IR.

This way you can "Blend In" an IR into another.

 

For a Simple Color-Mix, use the "ANA.BlendTo" Command.

For special Mixing, look at "ANA.MixRGB" and there is lots more.

 

1. Mix

This will generate the Graphic below.

 

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.New|2|800|400

ANA.hgradient|2|&H0000FF|&H00FFFF

ANA.Mix|0|2|7

ANA.Show|2!

 

ANA.New|5|800|400

ANA.Fill|5|&H000000|4|&HFFFFFF

ANA.New|6|800|400

ANA.Fill|6|&H000000|3|&HFFFFFF

ANA.BlendTo|5|6|7|80

ANA.Show|7!

 

ANA.Show|1!

ANA.BlendTo|7|2|3|40

ANA.Show|3!

ENR.

 

Using BlendTo with a strenght of  40

 

Mix1     +     Mix2           =         Blend1  

 

Usiong different settings for strength, you can decide how strong each IR will be present in the result.

 

Blend80   BlendA0

 

 

 

Syntax

 

ANA.BlendTo[|P1][|P2][|P3][|P4]

 

Parameter Explanation

 

P1 - Source A Image-Register Number, if omitted, IR 0 will be used.

P2 - Source B Image-Register Number, if omitted, IR 0 will be used.

P3 - opt. Destination Image-Register Number, if omitted, IR 2 will be used.

P4 - opt. Strength of Blending, 0-255 ( 0-&HFF) 0 -> Source A is maximum strong, 255 - Source B is maximum strong, if omitted &H80 (128 dez) 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.BlendTo-Sample

'***********************************

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.New|2|800|400

ANA.hgradient|2|&H0000FF|&H00FFFF

ANA.Mix|0|2|7

ANA.Show|2!

 

ANA.New|5|800|400

ANA.Fill|5|&H000000|4|&HFFFFFF

ANA.Show|5!

ANA.New|6|800|400

ANA.Fill|6|&H000000|2|&HFFFFFF

ANA.Show|6!

ANA.BlendTo|5|6|7|80

ANA.Show|7!

 

ANA.Show|1!

ANA.BlendTo|7|2|3|90

ANA.Show|3!

ENR.

 

' Here you can see the result of the Operation.

 

Mix

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: