Esempio n. 1
0
        public override IImageDecoder OpenImage(ArcFile arc, Entry entry)
        {
            var imp_arc = (ImpArchive)arc;
            var offset  = entry.Offset;
            var info    = new ImpMetaData
            {
                Width    = arc.File.View.ReadUInt32(offset),
                Height   = arc.File.View.ReadUInt32(offset + 4),
                BPP      = 32,
                Key      = imp_arc.Key,
                HasAlpha = arc.File.View.ReadUInt32(offset + 12) != 0,
            };
            uint packed_size = arc.File.View.ReadUInt32(offset + 8);
            var  input       = arc.File.CreateStream(offset, packed_size + 0x10);

            return(new ImpDecoder(input, info));
        }
Esempio n. 2
0
 public ImpDecoder(IBinaryStream input, ImpMetaData info) : base(input, info)
 {
     m_has_alpha = info.HasAlpha;
     m_key       = new byte[4];
     LittleEndian.Pack(info.Key, m_key, 0);
 }