locked
extract and CHANGE albumart for a wav sound file RRS feed

  • Question

    • how can i extract and change the album art for a .wav sound using taglib


    • Edited by STEVE SHA Tuesday, January 24, 2012 10:17 PM
    Tuesday, January 24, 2012 12:32 PM

Answers

  • Please take a look at this wiki page at:

    http://en.wikipedia.org/wiki/WAV

     

    Metadata

    As a derivative of the Resource Interchange File Format (RIFF), WAV files can be tagged with metadata in the INFO chunk. In addition, WAV files can embed Extensible Metadata Platform (XMP) data. Applications may not handle this extra information or may expect to see it in a particular place. Although the RIFF specification requires applications ignore chunks they do not recognize, some applications are confused by additional chunks.

     

     

    Limitations

    ...

    ...

     

    Unlike formats like FLAC, WAV files don't usually have information fields, for instance, in the case of a song, title, artist, album, year, etc.


    My blog: http://soho-hsh.blogspot.com
    Thursday, January 26, 2012 2:54 AM

All replies

  • Could you provide additional explanation about your question or describe it more detaily?
    My blog: http://soho-hsh.blogspot.com
    Wednesday, January 25, 2012 5:28 AM
  • hello

    i have this code to extract mp3 alpum art

     Dim file = TagLib.File.Create(filename)
                If file.Tag.Pictures.Length >= 1 Then
                    Dim bin = DirectCast(file.Tag.Pictures(0).Data.Data, Byte())
                    Dim album_art As System.Drawing.Image = System.Drawing.Image.FromStream(New MemoryStream(bin)).GetThumbnailImage(100, 100, Nothing, System.IntPtr.Zero)

    and this code to change the album art

      Dim fi_le As TagLib.File = TagLib.File.Create(Form1.filename)
                fi_le.Tag.Clear()
                If fn <> Nothing Then
                    Dim picture As TagLib.Picture = TagLib.Picture.CreateFromPath(fn)------------fn is the new albumart
                    Dim albumCoverPictFrame As New TagLib.Id3v2.AttachedPictureFrame(picture)
                    albumCoverPictFrame.MimeType = System.Net.Mime.MediaTypeNames.Image.Jpeg
                    albumCoverPictFrame.Type = TagLib.PictureType.FrontCover
                    Dim pictFrames() As TagLib.IPicture = {albumCoverPictFrame}
                    fi_le.Tag.Pictures = pictFrames
                End If

    it works fine for mp3

    but it Corrupt the .wav file so i'm thinking there must be  some thing to tell taglib# it's a wav file ?????

    thank you much

     


    • Edited by STEVE SHA Wednesday, January 25, 2012 1:48 PM
    Wednesday, January 25, 2012 1:47 PM
  • Please take a look at this wiki page at:

    http://en.wikipedia.org/wiki/WAV

     

    Metadata

    As a derivative of the Resource Interchange File Format (RIFF), WAV files can be tagged with metadata in the INFO chunk. In addition, WAV files can embed Extensible Metadata Platform (XMP) data. Applications may not handle this extra information or may expect to see it in a particular place. Although the RIFF specification requires applications ignore chunks they do not recognize, some applications are confused by additional chunks.

     

     

    Limitations

    ...

    ...

     

    Unlike formats like FLAC, WAV files don't usually have information fields, for instance, in the case of a song, title, artist, album, year, etc.


    My blog: http://soho-hsh.blogspot.com
    Thursday, January 26, 2012 2:54 AM