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.ResizeTo - Create new, empty IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.ResizeTo

Resize existing IT to a new IR

 

 

Intention

 

This command can be used to resize an IR into a new IR with a specified resolution.
It will create a new IR with a specified resolution from a already existing IR.

It will "Stretch" the existing IR into the new IR's resolution.

 

 

1. Create new IR and copy the resized Content of another IR

As you can see below, the Resizing will not take any Aspect-Ratio into account, but use the full X and Y Size of the new IR.

 

STW.Act|FORM_DESKTOPS_MANAGER_FRMMAIN_CLASS:0|Desktops-Manager

ANA.Snap|1

ANA.ResizeTo|1|0|800|200

ANA.show|0!

ENR.

 

 

Resized_new 2

 

2. Resize IR to iself

You can also specify the Target IR with the same IR as the Source, then the IR itself will be resized.

 

STW.ct|Chrome_WidgetWin_1|- Brave

ANA.Snap|0

ANA.ResizeTo|0|0|20|30

ANA.ResizeTo|0|0|400|600

ANA.Show|0!

ENR.

 

Source                                                       Result

 

Brav       Block1

 

 

 

Syntax

 

ANA.ResizeTo|P1|P2|P3|P4

 

Parameter Explanation

 

P1 - Source Image-Register Number for the IR that is to be resized.

P2 - Target Image-Register Number can be identical to the Source Register Number

P3 - opt. X-Resolution for the new IR Content (default is Target x-resolution)

P4 - opt. Y-Resolution for the new IR Content (default is Target y-resolution)

 

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

 

 

Example

 

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

' ANA.ResizeTo-Sample

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

STW.ct|Chrome_WidgetWin_1|- Brave

ANA.Snap|0

ANA.ResizeTo|0|1|20|30

ANA.ResizeTo|1|0|400|600

ANA.Show|0!

ENR.

 

 

' Here you can see the Original Window and the result of the Operation.

 

Brav       Block1

 

 

 

 

Remarks

 

This Functionality is also included in the "ANA.New"-Command. As it would be hard to find, we have sorted the Parameters here in another way and made this extra-command.

 

 

Limitations:

 

-

 

 

See also: