If you're writing in C# I can help you. It works beautifully for me.
const int BASS_TAG_MP4_PICTURE = 0x1400; // + index #, picture : TAG_BINARY structure
[DllImport("bass.dll", EntryPoint = "BASS_ChannelGetTags", CharSet = CharSet.Auto)]
public static extern IntPtr BASS_ChannelGetTags(int handle, int tags);
[StructLayout(LayoutKind.Sequential)]
public struct TAG_BINARY
{
public IntPtr data;
public int length;
}
once you have this set up, the actual use is trivial:
var tagPtr = BASS_ChannelGetTags(BassStream, BASS_TAG_MP4_PICTURE);
if (tagPtr != IntPtr.Zero)
{
TAG_BINARY tag = (TAG_BINARY)Marshal.PtrToStructure(tagPtr, typeof(TAG_BINARY));
byte[] imageData = new byte[tag.length];
Marshal.Copy(tag.data, imageData, 0, tag.length);
File.WriteAllBytes(art, imageData);
}