Esempio n. 1
0
        public static IImage <RGB> GenerateRgb(int width, int height, IEnumerable <RGB> data)
        {
            // Input check and convert IEnumerable<RGB> to RGB[]
            RGB[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new RGBImage(width, height, dataArr));
        }
Esempio n. 2
0
        private static unsafe IImage <T> ReadToArray <T>(string filename, Func <BGRA, T> convColor, Func <BGRA, T> convBlack, Func <int, int, T[], IImage <T> > generator)
            where T : struct, IEquatable <T>
        {
            ErrorChecker.CheckImagePath(filename);

            using (var bitmap = new Bitmap(filename))
            {
                Debug.Print("{0}", bitmap.PixelFormat);
                return(ReadToArray(bitmap, convColor, convBlack, generator));
            }
        }
Esempio n. 3
0
        public static IImage <BGRA> GenerateBgra(int width, int height, IEnumerable <BGRA> data)
        {
            BGRA[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new BgraImage(width, height, dataArr));
        }
Esempio n. 4
0
        public static IImage <BGRA> GenerateBgra(int width, int height, BGRA[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new BgraImage(width, height, data));
        }
Esempio n. 5
0
        public static IImage <BGRA> GenerateBgra(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new BgraImage(width, height, new BGRA[width * height]));
        }
Esempio n. 6
0
        public static IImage <HSV> GenerateHsv(int width, int height, IEnumerable <HSV> data)
        {
            HSV[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new HsvImage(width, height, dataArr));
        }
Esempio n. 7
0
        public static IImage <Complex> GenerateComplex(int width, int height, Complex[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new ComplexImage(width, height, data));
        }
Esempio n. 8
0
        public static IImage <double> Generate(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new Image(width, height, new double[width * height]));
        }
Esempio n. 9
0
        public static IImage <bool> GenerateBinary(int width, int height, bool[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new BinaryImage(width, height, data));
        }
Esempio n. 10
0
        public static IImage <CMYK> GenerateCmyk(int width, int height, CMYK[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new CmykImage(width, height, data));
        }
Esempio n. 11
0
        public static IImage <CMYK> GenerateCmyk(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new CmykImage(width, height, new CMYK[width * height]));
        }
Esempio n. 12
0
        public static IImage <RGB> GenerateRgb(int width, int height, RGB[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new RGBImage(width, height, data));
        }
Esempio n. 13
0
        public static IImage <RGB> GenerateRgb(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new RGBImage(width, height));
        }
Esempio n. 14
0
        public static IImage <Complex> GenerateComplex(int width, int height, IEnumerable <Complex> data)
        {
            Complex[] dataArray = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new ComplexImage(width, height, dataArray));
        }
Esempio n. 15
0
        public static IImage <bool> GenerateBinary(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new BinaryImage(width, height, new bool[width * height]));
        }
Esempio n. 16
0
        public static IImage <CMYK> GenerateCmyk(int width, int height, IEnumerable <CMYK> data)
        {
            CMYK[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new CmykImage(width, height, dataArr));
        }
Esempio n. 17
0
        public static IImage <HSV> GenerateHsv(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new HsvImage(width, height, new HSV[width * height]));
        }
Esempio n. 18
0
        public static IImage <bool> GenerateBinary(int width, int height, IEnumerable <bool> data)
        {
            bool[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new BinaryImage(width, height, dataArr));
        }
Esempio n. 19
0
        public static IImage <HSV> GenerateHsv(int width, int height, HSV[] data)
        {
            ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new HsvImage(width, height, data));
        }
Esempio n. 20
0
        public static IImage <double> Generate(int width, int height, IEnumerable <double> data)
        {
            double[] dataArr = ErrorChecker.CheckWidthHeightData(width, height, data);

            return(new Image(width, height, dataArr));
        }
Esempio n. 21
0
        /// <summary>
        /// Generates a blank complex image
        /// </summary>
        /// <param name="width">Image Width</param>
        /// <param name="height">Image Height</param>
        /// <returns>"Blank" Complex Image</returns>
        public static IImage <Complex> GenerateComplex(int width, int height)
        {
            ErrorChecker.CheckWidthHeight(width, height);

            return(new ComplexImage(width, height));
        }