Exemple #1
0
        protected override ImageData GetImageData()
        {
            m_input.Position = 4;
            var info = new TxMetaData {
                BPP = 8, Colors = 0x100
            };

            this.Info       = info;
            info.Stride     = m_input.ReadUInt16();
            info.Height     = m_input.ReadUInt16();
            info.Width      = (uint)info.Stride;
            info.DataOffset = m_input.Position;
            var reader = new TxReader(m_input, info);
            var pixels = reader.Unpack();

            return(ImageData.CreateFlipped(Info, PixelFormats.Indexed8, Palette, pixels, info.Stride));
        }
Exemple #2
0
 public TxReader(IBinaryStream input, TxMetaData info)
 {
     m_input  = input;
     m_info   = info;
     m_output = new byte[m_info.Stride * (int)m_info.Height];
 }