public SpriteGrid CreateSpritesInImagesPng(Sprite resultArrayOfJoinedBitmap) { var c = resultArrayOfJoinedBitmap.Bitmaps.Select(it => new B { Content = it }).ToArray(); var maxHeight = c.Max(it => it.Content.Height); var maxWidth = resultArrayOfJoinedBitmap.MirrorOffsetX * 2; var bitmap = CreateSpriteBitmap(c, maxHeight, maxWidth, resultArrayOfJoinedBitmap.MirrorOffsetX, resultArrayOfJoinedBitmap.MirrorOffsetY); var spriteInfo = new SpriteGrid { Id = resultArrayOfJoinedBitmap.Id, XSymmetry = resultArrayOfJoinedBitmap.MirrorOffsetX, YSymmetry = resultArrayOfJoinedBitmap.MirrorOffsetY, GridBitmap = bitmap, UnitName = resultArrayOfJoinedBitmap.Name, SpriteHeight = maxHeight, SpriteWidth = maxWidth, NumberOfFrames = c.Length / 9, NumberOfDirections = 16 }; return spriteInfo; }