public void Load(StreamInfo input) { _format = new BTX(input.FileData); _bitmapInfos = new List <BitmapInfo> { new BitmapInfo(_format.Texture, new FormatInfo((int)_format.Header.Format, _format.FormatName)) }; }
public void Load(StreamInfo input, BaseReadOnlyDirectoryNode node) { _format = new BTX(input.FileData); if (_format.HasPalette) { var indexEncodingInfo = ImageEncodingInfos.FirstOrDefault(x => x.EncodingIndex == (int)_format.Header.Format); var paletteEncodingInfo = PaletteEncodingInfos.FirstOrDefault(x => x.EncodingIndex == (int)_format.Header.Format); _bitmapInfos = new List <BitmapInfo> { new IndexedBitmapInfo(_format.Texture, indexEncodingInfo, _format.Palette, paletteEncodingInfo) }; } else { _bitmapInfos = new List <BitmapInfo> { new BitmapInfo(_format.Texture, ImageEncodingInfos.First(x => x.EncodingIndex == (int)_format.Header.Format)) } }; }