Taglib sharp album cover tutorial
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Hi, I wanted to get the embedded cover art of a music file I'm playing using taglib-sharp.
Here's my code, please help!
On form_load, I've already added SetAlbumArt() so that can't be the cause of the problem.
Here's my code, please help!
On form_load, I've already added SetAlbumArt() so that can't be the cause of the problem.
Code: Select all
Private Sub SetAlbumArt()
On Error Resume Next
If Playlist.List.SelectedItem IsNot Nothing Then
Dim file As TagLib.File = TagLib.File.Create(Playlist.List.SelectedItem.ToString())
If file.Tag.Pictures.Length > 0 Then
Dim bin = DirectCast(file.Tag.Pictures(0).Data.Data, Byte())
pb.Image = Image.FromStream(New IO.MemoryStream(bin)).GetThumbnailImage(100, 100, Nothing, IntPtr.Zero)
Else
pb.Image = My.Resources.sry
End If
End If
End Sub
Last edited by frozerlaxegon on Fri Aug 13, 2010 5:05 pm, edited 1 time in total.
You've been RICKROLL'D
Have you tried Function instead of Private sub?
mandai wrote:What return variable/type should it be expecting?It returns nothing, it is suppose to be returning a picture of the album cover art.
You've been RICKROLL'D
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023