Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- page
- Image to convert color space.
- newColorSpace
- New color space.
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[,])
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 Basic | 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) |