Ejemplo n.º 1
0
        /// <summary>
        /// Reads a DirtyImageFragment from the stream, assuming it is already in compressed format.
        /// </summary>
        /// <param name="s"></param>
        public DirtyImageFragment(IDataStream s)
        {
            bounds.X      = s.ReadInt16();
            bounds.Y      = s.ReadInt16();
            bounds.Width  = s.ReadUInt16();
            bounds.Height = s.ReadUInt16();
            int imgLength = s.ReadInt32();

            screenshot = new Screenshot(bounds.Width, bounds.Height, 32, new byte[imgLength], bufferIsCompressed: true);
            s.Read(screenshot.Buffer, 0, imgLength);
        }