public IList <ImageInfo> Load(Stream srdStream, Stream srdvStream) { using var br = new BinaryReaderX(srdStream, ByteOrder.BigEndian); // Read sections var sections = new List <SrdSection>(); while (srdStream.Position < srdStream.Length) { sections.Add(br.ReadType <SrdSection>()); } _rsfSection = sections[1]; // Add image infos var imageInfos = new List <ImageInfo>(); foreach (var imageSection in sections.Skip(2)) { if (imageSection.header.magic != "$TXR") { continue; } // Read information var mipCount = imageSection.subData[0x13]; var width = BinaryPrimitives.ReadInt16LittleEndian(imageSection.sectionData[6..]);
public SrdImageInfo(byte[] imageData, IList <byte[]> mipMaps, int imageFormat, Size imageSize, SrdSection section) : base(imageData, mipMaps, imageFormat, imageSize) { Section = section; }
public SrdImageInfo(byte[] imageData, int imageFormat, Size imageSize, SrdSection section) : base(imageData, imageFormat, imageSize) { Section = section; }