Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

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

Image/Pixel-Color Operations

ANA.Brightness - Change Brightness in IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.Brightness

Change Brightness in an Image-Register (IR)

 

 

Intention

 

This command will change the Brightness value of an IR. The given P2 value can be positive or negative.

Negative values for P2, will decrease the contrast. If P3 is given, then the result will be stored in IR P3.

 

1. Change color Brightness in IR

In this case we do not specify P3 therefore we will directly change the Original IR that contains the picture.

 

VAF.$$PIA=?exeloc\Sara2.jpg

NEF.$$PIA

  MBX.No such file.

  ENR.

EIF.

ANA.Load|0|$$PIA

ANA.cow|0|64|1

ANA.Show|1!

ANA.Brightness|1|100

GSB.Save|1

ANA.Brightness|1|-50

ANA.Show|1!

ANA.Brightness|1|100

DMP.1

ANA.Show|1!

ENR.

 

 

Here is another Sample Picture.

clip0194   clip0204   clip0206   clip0205

    Original Picture                                        ANA.Complement

 

clip0207

Brightness Calculation are fast and will be done mostly in less then 1 Second.

 

 

Syntax

 

ANA.Brightness|P1|P2[|P3]

 

Parameter Explanation

 

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

 P2 - (number, -255 to +255) Brightness Value, positive values will increase the contrast, negative values will decrease the contrast.

 P3 - Destination Image-Register Number, if omitted, IR P1 will be used as destination IR.

 

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

 

 

Example

 

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

' ANA.Brightness-Sample

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

VAF.$$PIA=?exeloc\Sara2.jpg

NEF.$$PIA

  MBX.No such file.

  ENR.

EIF.

ANA.Load|0|$$PIA

ANA.Show|0!

ANA.Brightness|0|-100

ANA.Show|0!

ANA.Brightness|0|180

ANA.Show|0!

ENR.

 

clip0199   clip0202   clip0203

 

 

Remarks

-

 

 

Limitations:

-

 

See also:

 

  ANA.Contrast

  ANA.Luminance / Change_Luminance