Esempio n. 1
0
        private Bitmap SaveChannelLab(Image inputImage, Func <Color, LabCoordinates, Color> colorExtractionFunction)
        {
            Bitmap result = new Bitmap(inputImage.Width, inputImage.Height);

            using (Bitmap bmp = new Bitmap(inputImage))
            {
                LabCoordinates coordinates = new LabCoordinates(bmp);

                for (int x = 0; x < bmp.Width; x++)
                {
                    for (int y = 0; y < bmp.Height; y++)
                    {
                        Color pxl = colorExtractionFunction(bmp.GetPixel(x, y), coordinates);
                        result.SetPixel(x, y, pxl);
                    }
                }
            }

            return(result);
        }
Esempio n. 2
0
 private Color GetLChannel(Color inputColor, LabCoordinates helper)
 {
     return(helper.GetLChannel(inputColor));
 }