ImageGear .NET - Updated
ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method
Example 




ImageGear24.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > ConvertColorSpace Method : ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method
Image to convert color space.
New color space.
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)
public static void ConvertColorSpace( 
   ImGearRasterPage page,
   ImGearColorSpace newColorSpace
)
public: static void ConvertColorSpace( 
   ImGearRasterPage* page,
   ImGearColorSpace newColorSpace
) 
public:
static void ConvertColorSpace( 
   ImGearRasterPage^ page,
   ImGearColorSpace 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
// Convert an image to grayscale and detect the edges in the image.
ImGearRasterProcessing.ConvertColorSpace(igRasterPage, new ImGearColorSpace(ImGearColorSpaceIDs.Gy));
ImGearEffects.EdgeDetection(igRasterPage, ImGearEdgeDetectionMethods.DIFF_RECURSIVE);
' Convert an image to grayscale and detect the edges in the image.
ImGearRasterProcessing.ConvertColorSpace(igRasterPage, New ImGearColorSpace(ImGearColorSpaceIDs.Gy))
ImGearEffects.EdgeDetection(igRasterPage, ImGearEdgeDetectionMethods.DIFF_RECURSIVE)
See Also

Reference

ImGearRasterProcessing Class
ImGearRasterProcessing Members
Overload List
ImGearRasterPage Class
ImGearColorSpace Structure