public Canvas(int width, int height) { t_width = width; t_height = height; t_stride = (t_width * Engine.BytesPerPixel.BGRA); t_imageData = new ImageData(width, height); t_grid = new ImageDataGrid(ref t_imageData); }
public Canvas(string fileName) { using (MagickImage image = new MagickImage(fileName)) { t_width = image.Width; t_height = image.Height; t_stride = (t_width * Engine.BytesPerPixel.BGRA); t_imageData = new ImageData(image.Width, image.Height); t_imageData.Array = image.ToByteArray(MagickFormat.Bgra); t_grid = new ImageDataGrid(ref t_imageData); } }
public Canvas(byte[] imageData, int width, int height) : this(width, height) { t_imageData = new ImageData(imageData, width, height); t_grid = new ImageDataGrid(ref t_imageData); }