LogViewer.Utilities.Raw8UBitmapDecoder.Create C# (CSharp) Method

Create() public static method

public static Create ( byte pixels, int width, int height ) : Raw8UBitmapDecoder
pixels byte
width int
height int
return Raw8UBitmapDecoder
        public static Raw8UBitmapDecoder Create(byte[] pixels, int width, int height)
        {
            BitmapSource frame = BitmapSource.Create(width, height, 96, 96, PixelFormats.Gray8, null, pixels, width);
            List<BitmapFrame> frames = new List<BitmapFrame>();
            frames.Add(BitmapFrame.Create(frame));
            return new Raw8UBitmapDecoder() { frames = frames };
        }
Raw8UBitmapDecoder