Accusoft ImagXpress 13
AdjustRGB Method
AdjustType indicates whether the red, green, and blue parameters are specified in units or by percentage. The IX_AdjustRGBType enumeration values should be used for this parameter.
The amount of adjustment to apply to the red color component.
The amount of adjustment to apply to the green color component.
The amount of adjustment to apply to the blue color component.
Description
Adjusts the red, green, and blue components of the current image.
Syntax
Visual Basic
Public Sub AdjustRGB( _
   ByVal IPAdjustType As Integer, _
   ByVal IPAdjustRed As Integer, _
   ByVal IPAdjustGreen As Integer, _
   ByVal IPAdjustBlue As Integer _
) 
Parameters
IPAdjustType
AdjustType indicates whether the red, green, and blue parameters are specified in units or by percentage. The IX_AdjustRGBType enumeration values should be used for this parameter.
IPAdjustRed
The amount of adjustment to apply to the red color component.
IPAdjustGreen
The amount of adjustment to apply to the green color component.
IPAdjustBlue
The amount of adjustment to apply to the blue color component.
Remarks

When IPadjustType = AsPercent (0), valid red, green, and blue values are between -100 and 100 (made as percent).

When IPadjustType = InUnits (1), valid RGB values are between -255 and 255 (made in units).

Since pixel values must fall within the range 0-255, resulting pixel values less than 0 are set to 0 and resulting pixel values greater than 255 are set to 255.

Example

Sepia sample

The following example uses the AdjustRGB method and the ColorDepth method to convert an image to Sepia.

VB6 (Visual Basic) Copy Code
ImagXpress1.ColorDepth 8, 2, 0
ImagXpress1.UndoEnabled = False
ImagXpress1.ColorDepth 24, 0, 0
ImagXpress1.AdjustRGB 1, 40, 30, -10
ImagXpress1.Brightness -10
ImagXpress1.ViewUpdate = True
ImagXpress1.ColorDepth 8, 0, 0
ImagXpress1.UndoEnabled = True

 

See Also

ImagXpress Object  | ImagXpress Members  | Color Image Processing  | Image Processing

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback