23 May '13 - 05:10 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: PictureGetImage BASS.NET no image returned for .flac  (Read 1315 times)
BeanAnimal
Guest
« on: 17 Jun '09 - 05:06 »
Reply with quoteQuote

I am just starting out with BASS.

I am adapting the VB.NET frmTag example to play FLAC files as well as MP3.  I have added a picturebox and am able to easily use TI.PictureGetImage(n) to display the embedded album art in an .mp3 file.

However, I can not display the album art embedded in a .flac file.

I have added the following code to the vb.net sample:


'imports
        Imports BassFlac = Un4seen.Bass.AddOn.Flac.BassFlac


'changed action of play button to
        If TextBox1.Text.ToLower().EndsWith(".flac") Then
            'strm = Bass.BASS_StreamCreateFile(TextBox1.Text, 0, 0, Un4seen.Bass.BASSFlag.BASS_SAMPLE_FLOAT)

            strm = BassFlac.BASS_FLAC_StreamCreateFile(TextBox1.Text, 0, 0, BASSFlag.BASS_DEFAULT)
        End If


'added code to display image in a picturebox
       pb1.Image = TI.PictureGetImage(0)


the BassFlac.dll and Bass.dll are in the BIN directory.

The .flac file appears to play fine and the other tags on the form are returned. All other software (foobar2000, silverjuke, and a few vb6 and vb.net ID3 tag libaries) display the embedded album art correctly for both FLAC and MP3 files.

Thoughts?
Logged
radio42
Posts: 4012


« Reply #1 on: 17 Jun '09 - 12:23 »
Reply with quoteQuote

How is your flac file being tagged?
If it contains only APE tags, there would no picture tags being read, as APE only supports text tag values.
Logged
BeanAnimal
Guest
« Reply #2 on: 17 Jun '09 - 16:13 »
Reply with quoteQuote

The tags are created using Tag&Rename so I am note sure what types of tags contain what types of information:

I know little about tag formats, other than Foobar2000 is able to show the cover art embedded in the FLAC files, and the TagLib Library is able to show the coverart from the Flac as well. 

If the BASS module is returning Album, Artist, Etc from the FLAC, then I would assume that those tags are ID3V2 but the coverart is being written to an APE or Vorbis comment tag?
Logged
radio42
Posts: 4012


« Reply #3 on: 17 Jun '09 - 22:14 »
Reply with quoteQuote

BASS.NET reads the tags available and returned via BASS_ChannelGetTags.
Unfortunately this doesn't return any picture tags for APE and/or MP4 - that's why BASS.NET also doesn't return any pictures for APE or MP4 tags.
In such case I suggest you to use any 3rd party tagging lib, like 'taglib-sharp' or 'Audiogenie'.
Logged
BeaAnimal
Guest
« Reply #4 on: 17 Jun '09 - 22:36 »
Reply with quoteQuote

I would certainly hope that full support for FLAC/VORBIS tags will be supported soon. I will use TagLib to do the dirty work, but that just makes things so much more complicated. FLAC has become very popular, as has the .NET platform.

Looking further at the tags for my FLAC files, there are no ID3 tags, all are FLAC style. So the BASS_ChennelGetTags function does have partial support at least.

Thanks for the responses... on to my next thread and new question Smiley
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #5 on: 18 Jun '09 - 16:09 »
Reply with quoteQuote

It isn't possible to include images in the BASS_TAG_OGG tags, as any 0s in the image data would mess things up, but perhaps another tag option could be added for them. Please upload an example file to have a look at, and I'll see what can be done.

   ftp.un4seen.com/incoming/
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines