ImageGear for .NET
ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method
See Also  Example Send Feedback
ImageGear21.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > ConvertColorSpace Method : ConvertColorSpace(ImGearRasterPage,ImGearColorSpace) Method




page
Image to convert color space.
newColorSpace
New color space.

Glossary Item Box

Converts page to a new color space.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

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

C#Copy Code
// 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);
Visual BasicCopy Code
' 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

©2013. Accusoft Corporation. All Rights Reserved.