Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Load/Save-Import/Export IR's >

Image/Pixel-Color Operations

ANA.ToClipboard - Copy Image from IR to Clipboard

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.ToClipboard

Copy Image from IR to  Clipboard

 

 

Intention

 

This command will copy any picture that is in an specified IR, into the Windows-Clipboard.

It is the Opposite Command to  "Ana.FromClipboard".

 

 

Use ANA.FromClipboard to store Clipboard-Content in IR 0 and display it

This will use IR 0 and also show the Contents.

 

$$PAF=?exeloc\Pics

$$FIL?$$PAF\P4.jpg

ANA.Load|0|$$FIL

' The CutRect Command is optional, it can be used to "Cut the borders" of an IR before other usage

ANA.CutRect|0|150|160|400|200

ANA.ToClipboard|0

' Picture is now in the Windows Clipboard

ENR.

 

 

 

ANA.ToClipboardRect is a bit special. Assume you have a picture of 640x400 and you specify:

 

ANA.ToClipboardRect|0|50|50|640|400

 

Then you may get a black Border of size 50 on the right side. This is because the limitation is the original Picture-Size.

If you specify instead a Target-Rectangle-Size that is larger then the original size, you will get a perfect match without a black Border.

ANA.ToClipboardRect|0|50|50|6400|4000

 

Of course you can specify exactly what you want, in such case please note that the X- and Y-Size is reduced by the values of how much you cut out at the upper and left side.

So this line would also do it:

ANA.ToClipboardRect|0|50|50|590|350 

 

 

Syntax

 

ANA.ToClipboard[|P1]

ANA.ToClipboardRect[|P1][|P2|P3|P4|P5][|P6]

 

Parameter Explanation

 

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

 

' If given, you must specify all 4 Rect-Parameters

P2 - Left-Border of Image to copy

P3 - Upper/Top-Border of Image to copy

P4 - Right-Border of Image to copy. If too large, will be replaced by Image maximum size.

P5 - Bottom-Border of Image to copy. If too large, will be replaced by Image maximum size.

 

P6 - Blit-Constant Parameter, if omitted Standard will be used. Details see Blit-Modes

 

 

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

 

 

Example

 

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

' ANA.ToClipboard-Sample

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

$$PAF=?exeloc\Pics

$$FIL=$$PAF\P4.jpg

ANA.Load|0|$$FIL

ANA.CutRect|0|150|160|4000|2000

ANA.ToClipboard|0

ANA.Show|0!

ENR.

 

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

' ANA.ToClipboardRect-Sample

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

$$PAF=?exeloc\Pics

$$FIL=$$PAF\P4.jpg

ANA.Load|0|$$FIL

ANA.ToClipboardRect|0|150|88|290|189|2

ANA.FromClipboard|1

ANA.Show|1!

ENR.

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also:

 

    Blit-Modes

  ANA.FromClipboard

  CLP. - Clipboard - Operation