| 1234567891011121314151617181920212223 |
- // Copyright (c) Craftwork Games. All rights reserved.
- // Licensed under the MIT license.
- // See LICENSE file in the project root for full license information.
- using System.IO;
- using System.Text.Json;
- namespace MonoGame.Extended.Content.TexturePacker;
- internal static class TexturePackerFileReader
- {
- internal static TexturePackerFileContent Read(string path)
- {
- using var stream = File.OpenRead(path);
- return Read(stream);
- }
- internal static TexturePackerFileContent Read(Stream stream)
- {
- var tpFile = JsonSerializer.Deserialize<TexturePackerFileContent>(stream);
- return tpFile;
- }
- }
|