public static IImage ToUserImage(UserFrame frame) { ImageInfo info = new ImageInfo(frame.Cols, frame.Rows, PixelFormat.R16); ArrayImage <byte> image = new ArrayImage <byte>(frame.Data, info, true); return(image); }
public void plot() { IFigure f2 = ShoPlotHelper.Figure(); DoubleArray pme = ArrayRandom.RandomDoubleArray(50, 50); ArrayImage.GetArrayImage(pme, -1.0, 1.0); ShoChart ch = new ShoContourChart(pme, null); }
static void Main(string[] args) { ArrayImage img = new ArrayImage("p.jpg"); //img.Pasterize(16.0f); img.Blur(Kernel.GaussianKernel(21)); //TODO:Shit img.Save("p2.jpg"); }
public void Start(Png png) { int width = png.ihdr.width, height = png.ihdr.height, bitdepth = png.ihdr.bitdepth; ColorType colortype = png.ihdr.colortype; switch (colortype) { case ColorType.GRAY: throw new NotSupportedException(); //support these later case ColorType.GRAY_ALPHA: throw new NotSupportedException(); //support these later case ColorType.PALETTE: throw new NotSupportedException(); //support these later case ColorType.RGB: if (bitdepth == 16) throw new NotSupportedException(); else pf = 24; break; case ColorType.RGB_ALPHA: if (bitdepth == 16) throw new NotSupportedException(); else pf = 32; break; } ArrayImage = new ArrayImage(); ArrayImage.Width = width; ArrayImage.Height = height; ArrayImage.Pixels = new int[width * height]; }
public DepthImage(DepthFrame frame) { Frame = frame; Info = new ImageInfo(frame.Cols, frame.Rows, PixelFormat.R16); image = new ArrayImage <byte>(frame.Data, Info, true); }
public ColorImage(ColorFrame frame) { Frame = frame; Info = new ImageInfo(frame.Cols, frame.Rows, PixelFormat.B8G8R8); image = new ArrayImage <byte>(frame.Data, Info, true); }