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)); }
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)); } }
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)); }
public static IImage <BGRA> GenerateBgra(int width, int height, BGRA[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new BgraImage(width, height, data)); }
public static IImage <BGRA> GenerateBgra(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new BgraImage(width, height, new BGRA[width * height])); }
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)); }
public static IImage <Complex> GenerateComplex(int width, int height, Complex[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new ComplexImage(width, height, data)); }
public static IImage <double> Generate(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new Image(width, height, new double[width * height])); }
public static IImage <bool> GenerateBinary(int width, int height, bool[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new BinaryImage(width, height, data)); }
public static IImage <CMYK> GenerateCmyk(int width, int height, CMYK[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new CmykImage(width, height, data)); }
public static IImage <CMYK> GenerateCmyk(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new CmykImage(width, height, new CMYK[width * height])); }
public static IImage <RGB> GenerateRgb(int width, int height, RGB[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new RGBImage(width, height, data)); }
public static IImage <RGB> GenerateRgb(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new RGBImage(width, height)); }
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)); }
public static IImage <bool> GenerateBinary(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new BinaryImage(width, height, new bool[width * height])); }
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)); }
public static IImage <HSV> GenerateHsv(int width, int height) { ErrorChecker.CheckWidthHeight(width, height); return(new HsvImage(width, height, new HSV[width * height])); }
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)); }
public static IImage <HSV> GenerateHsv(int width, int height, HSV[] data) { ErrorChecker.CheckWidthHeightData(width, height, data); return(new HsvImage(width, height, data)); }
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)); }
/// <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)); }