Ejemplo n.º 1
0
        public static async Task <string> GenerateBase64UrlForImageAsync(this IRandomAccessStream randomAccessStream)
        {
            var base64Str = await randomAccessStream.ToBase64StringAsync();

            var format = await randomAccessStream.DetectImageFormat();

            return($"data:image/{format.ToString().ToLower()},{base64Str}");
        }