AForge.Imaging.Filters.ColorRemapping.ColorRemapping C# (CSharp) Method

ColorRemapping() public method

Initializes a new instance of the ColorRemapping class.
Initializes the filter without any remapping. All pixel values are mapped to the same values.
public ColorRemapping ( ) : System
return System
        public ColorRemapping( )
        {
            redMap      = new byte[256];
            greenMap    = new byte[256];
            blueMap     = new byte[256];
            grayMap     = new byte[256];

            // fill the maps
            for ( int i = 0; i < 256; i++ )
            {
                redMap[i] = greenMap[i] = blueMap[i] = grayMap[i] = (byte) i;
            }

            formatTranslations[PixelFormat.Format8bppIndexed] = PixelFormat.Format8bppIndexed;
            formatTranslations[PixelFormat.Format24bppRgb]    = PixelFormat.Format24bppRgb;
            formatTranslations[PixelFormat.Format32bppRgb]    = PixelFormat.Format32bppRgb;
            formatTranslations[PixelFormat.Format32bppArgb]   = PixelFormat.Format32bppArgb;
        }

Same methods

ColorRemapping::ColorRemapping ( byte grayMap ) : System
ColorRemapping::ColorRemapping ( byte redMap, byte greenMap, byte blueMap ) : System