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.MixTar - Combine multiple IR's

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.MixTar

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

 

 

Intention

 

This command will combine/mix two IR's in multiple ways depending on the Blitmode.

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

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

 

1. Mix a horizontal and a vertical Gradient and the n again mix these with another Pattern from the Fill-Command.

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|1|800|400

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

ANA.Show|1!

ANA.mix|1|2

ANA.Show|2!

PAU.1

ENR.

 

Using Blitmode 7:

 

Mix1     +     Mix2           =           Mix3

 

Using Blitmode 5 in the second Mix, you get this:                                       Using Blitmode 2 in the second Mix, you get this:

 

Mix4   Mix 5

 

 

 

2. Mixing IR's with themselves doe not make much sense as you will mostly get whether a white, black or inverted result.

However you an do that.

 

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.Show|0!

ANA.Mix|0|0|3

ANA.Show|0!

ENR.

 

 

3. Mixing IR's using a Blimtmode to let picture "shine through".

In this script we will make the second picture to shine through the first picture using Blimtode 2.

 

 

P3     P4              

 

Dependinfd on the position of the

You can use:

ANA.mix|0|1|2

ANA.invert|1

or 

ANA.invert|1

ANA.mix|0|1|2

 

to get any of these results below.

 

Command, the result may be any of these:

 

  clip0146   clip0148

 

$$PAA=?exeloc\Pics\P3.jpg

$$PAB=?exeloc\Pics\P4.jpg

IEF.$$PAB

  ANA.Load|1|$$PAB

  'ANA.Show|1!#

ELS.

  MBX.File does not exist:$crlf$$$PAT

EIF.

IEF.$$PAA

  ANA.Load|0|$$PAA|1

  'ANA.Show|0!#

ELS.

  MBX.File does not exist:$crlf$$$PAT

EIF.

ANA.mix|0|1|2

ANA.invert|1

ANA.Show|1!#

ENR.

 

 

 

 

Syntax

 

ANA.MixTar[|P1][|P2][|P3]

 

Parameter Explanation

 

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

P2 - opt. Destination Image-Register Number, if omitted, IR 0 will be used.

P3 - opt. Blitmode for Mixing.

 

 

The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".

 

 

Example

 

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

' ANA.MixTar-Sample

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

ANA.New|0|800|400

ANA.vgradient|0|&H00FF00|&HFF0000

ANA.New|1|800|400

ANA.hgradient|1|&H00FF00|&H00FFFF

ANA.Show|0!

ANA.Show|1!

$$BLI=7

ANA.mix|0|1|$$BLI

ANA.Show|1!

ENR.

 

' Here you can see a part of the result of the Operation.

 

Mix6

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: