id3 display album image in mp3 file using c # mvc razor

2

I'm building an application in C # and ASP.NET MVC and Razor that reads data from mp3 files, but I can not display the album image. I have tried several libraries available, extracted all the information but the album cover art, I believe it is necessary to convert bitmap information to jpeg or some other format to be displayed via <img src> .

Can anyone help me?

    
asked by anonymous 20.09.2016 / 02:34

1 answer

0

This library does what you need in a practical way . This extension will also be required .

The idea is to convert this PictureManager to Web. The idea is to upload the file using a PictureFrame . The idea is to use FrameExtensions for this:

using System.IO;

using Id3.Frames;

namespace Id3
{
    public static class FrameExtensions
    {
        public static void LoadImage(this PictureFrame frame, string filePath)
        {
            frame.PictureData = File.ReadAllBytes(filePath);
        }

        public static void SaveImage(this PictureFrame frame, string filePath)
        {
            File.WriteAllBytes(filePath, frame.PictureData);
        }
    }
}
    
20.09.2016 / 15:40