BattleInfoPlugin.Models.Repositories.MapResource.MapResourcePrivate.GetMapImages C# (CSharp) Method

GetMapImages() public static method

public static GetMapImages ( MapInfo map ) : System.Windows.Media.Imaging.BitmapSource[]
map MapInfo
return System.Windows.Media.Imaging.BitmapSource[]
            public static BitmapSource[] GetMapImages(MapInfo map)
            {
                var swf = map.ToSwf();

                var frame = swf?.Tags.SkipWhile(x => x.TagType != TagType.ShowFrame).ToArray();
                var jpeg3 = frame
                    .OfType<DefineBitsTag>()
                    .Where(x => x.TagType == TagType.DefineBitsJPEG3)
                    .Select(x => x.ToBitmapFrame());
                var lossless2 = frame
                    .OfType<DefineBitsLosslessTag>()
                    .Where(x => x.TagType == TagType.DefineBitsLossless2)
                    .Select(x => x.ToBitmapFrame());

                return jpeg3.Concat(lossless2)
                    .Where(x => x != null)
                    .Where(x => x.PixelWidth == 768)
                    .ToArray();
            }