Beispiel #1
0
        /// <summary>
        ///     Constructs an image from a 2d list of pixels.
        /// </summary>
        /// <param name="colors">2d rectangular list of colors representing the pixels.</param>
        /// <returns name="image">Image</returns>
        public static Bitmap FromPixels(Color[][] colors)
        {
            var height = colors.Length;
            var width = colors[0].Length;

            var rgbVals = colors.SelectMany(row => row);

            return FromPixelsHelper(rgbVals, width, height);
        }