Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

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

Image/Pixel-Color Operations

ANA.EqualRes - Force equal Resolution for IR's

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.EqualRes

Force equal Resolution between Image-Register's (IR)

 

 

Intention

 

This command will enforce that IR P2 will have the same resolution as IR P1.

If P2 does not exist, it will be created. If it exists, it will be stretched/resized to the Size of P1.

 

Generate two IR's with different resolution and then make the resolution equal including stretch

The following Script shows the use of ANA.EqualRes.

 

ANA.New|0|800|400

ANA.hgradient|0|&HFF0000|&H1000F4

 

ANA.New|1|400|800

ANA.vgradient|1|&HFF0000|&H10FFF4

 

ANA.Show|0!

ANA.Show|1!

' Make Resolution from P2 to the resolution from P1.

ANA.EqualRes|0|1

DMP.6

ANA.Show|1!

ENR.

 

 

Generate new IR with the Resolution of the original IR

This will create a new, empty (black) IR with the resolution of the IR P1.

 

ANA.New|0|800|400

ANA.hgradient|0|&HFF0000|&H1000F4

ANA.Show|0!

ANA.EqualRes|0|1

DMP.6

ANA.Show|1!

ENR.

 

 

Leaving away P2

 

If P2 is omitted, it will be assumed to be P1+1

 

ANA.New|0|800|400

ANA.hgradient|0|&HFF0000|&H1000F4

ANA.Show|0!

ANA.EqualRes|0

DMP.6

ANA.Show|1!

ENR.

 

 

Syntax

 

ANA.EqualRes|P1[|P2]

 

Parameter Explanation

 

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

P2 - opt. Image-Register number, this IR will be stretched to the resolution of P1. If it does not exist it will be created. If omitted, P1+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.EqualRes-Sample

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

ANA.New|0|800|400

ANA.hgradient|0|&HFF0000|&H1000F4

 

ANA.New|1|400|800

ANA.vgradient|1|&HFF0000|&H10FFF4

 

ANA.Show|0!

ANA.Show|1!

' Make Resolution from P2 to the resolution from P1.

ANA.EqualRes|0|1

DMP.6

ANA.Show|1!

ENR.

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: