AForge.Imaging.HorizontalIntensityStatistics.HorizontalIntensityStatistics C# (CSharp) Method

HorizontalIntensityStatistics() public method

Initializes a new instance of the HorizontalIntensityStatistics class.
Unsupported pixel format of the source image.
public HorizontalIntensityStatistics ( UnmanagedImage image ) : System
image UnmanagedImage Source unmanaged image.
return System
        public HorizontalIntensityStatistics( UnmanagedImage image )
        {
            // check image format
            if (
                ( image.PixelFormat != PixelFormat.Format8bppIndexed ) &&
                ( image.PixelFormat != PixelFormat.Format16bppGrayScale ) &&
                ( image.PixelFormat != PixelFormat.Format24bppRgb ) &&
                ( image.PixelFormat != PixelFormat.Format32bppRgb ) &&
                ( image.PixelFormat != PixelFormat.Format32bppArgb ) &&
                ( image.PixelFormat != PixelFormat.Format48bppRgb ) &&
                ( image.PixelFormat != PixelFormat.Format64bppArgb )
                )
            {
                throw new UnsupportedImageFormatException( "Unsupported pixel format of the source image." );
            }

            // gather statistics
            ProcessImage( image );
        }

Same methods

HorizontalIntensityStatistics::HorizontalIntensityStatistics ( Bitmap image ) : System
HorizontalIntensityStatistics::HorizontalIntensityStatistics ( BitmapData imageData ) : System