获取适用于 Windows Store 应用程序的 .mp3 文件中的 Albumart [英] Get Albumart in .mp3 file for Windows Store App

查看:17
本文介绍了获取适用于 Windows Store 应用程序的 .mp3 文件中的 Albumart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取 mp3 文件中的 AlbumArt 图像?我正在使用 c# 开发 Windows Store 应用程序.

How can i get the AlbumArt image in the mp3 file? I am developing Windows Store app with c#.

MusicProperties 类给了我专辑名称艺术家姓名与.但它不能给我专辑封面.

MusicProperties class gives me Album name artist name vs. But it cant give me albumart.

推荐答案

查看 MSDN 示例以显示任何文件的缩略图.它还包括如何检索专辑封面.

Check out MSDN sample to show thumbnail of any file. It also consists how to retrieve the album art.

文件和文件夹缩略图示例

如果您想保存专辑封面,请查看 如何在 Windows 8 Metro 应用程序 c# 中将保存的缩略图图像存储在设备中

If you want to save the album art check out How to store save Thumbnail image in device in windows 8 metro apps c#

更新 1

MediaFileStorageFile.ImageControl<Image .../>

using (StorageItemThumbnail thumbnail = await MediaFile.GetThumbnailAsync(ThumbnailMode.MusicView, 300))
{
    if (thumbnail != null && thumbnail.Type == ThumbnailType.Image)
    {
        var bitmapImage = new BitmapImage();
        bitmapImage.SetSource(thumbnail);
        ImageControl.Source = bitmapImage;
    }
}

这篇关于获取适用于 Windows Store 应用程序的 .mp3 文件中的 Albumart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆