ImageGear v26.3 - Updated November 9, 2022
ImageGear.Core Assembly / ImageGear.Processing Namespace / ImGearRasterProcessing Class / ConvertColorSpace Method / ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method
Image to convert color space.
New color space.




ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method
Converts page to a new color space.
Syntax
'Declaration
 
Public Overloads Shared Sub ConvertColorSpace( _
   ByVal page As ImGearRasterPage, _
   ByVal newColorSpace As ImGearColorSpace _
) 
 
'Usage
 
Dim page As ImGearRasterPage
Dim newColorSpace As ImGearColorSpace
 
ImGearRasterProcessing.ConvertColorSpace(page, newColorSpace)

Parameters

page
Image to convert color space.
newColorSpace
New color space.
Remarks
Note: Conversion to Grayscale colorspace takes into account the human eye's sensitivity to different parts of the light spectrum. ImageGear uses the following formula when converting from RGB to Grayscale: Gray = Red * 77 / 255 + Green * 151 / 255 + Blue * 28 / 255. If you need to convert an image to Grayscale using equal weights for Red, Green and Blue, or any other weights, use ConvertColorSpace(ImGearRasterPage,ImGearColorSpace,Double[,])
Example
See Also