Exemple #1
0
        public static IMediaMetadata ReadMetadata(this IStorageFile file, string format, out IEnumerable <AttachedPicture> pictures)
        {
            IMediaEncoder encoder = MediaEncoderExtension.EncoderByMediaType(format);

            pictures = null;

            if (encoder != null)
            {
                if (encoder.Init(file, true))
                {
                    pictures = encoder.AttachedPictures;
                    return(encoder.GetMetadata());
                }
            }
            return(null);
        }