123456789101112131415161718192021222324252627282930313233 |
- using SkiaSharp;
- using System.IO;
- namespace Vinno.vCloud.Common.Vid2.Codec
- {
- public class VinnoImageDecoder
- {
- /// <summary>
- /// Convert VinnoImage to Image
- /// </summary>
- /// <param name="image"></param>
- /// <returns></returns>
- private SKBitmap VinnoImageToImage(VinnoImage image)
- {
- using (var ms = new MemoryStream(image.ImageData))
- {
- return SKBitmap.Decode(ms);
- }
- }
- /// <summary>
- /// Decode the
- /// </summary>
- /// <param name="image"></param>
- /// <returns></returns>
- public SKBitmap Decode(VinnoImage image)
- {
- return VinnoImageToImage(image);
- }
- }
- }
|