Results 1 to 10 of 10

Thread: Any ID3 class that supports APIC tag (cover art)?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,714

    Any ID3 class that supports APIC tag (cover art)?

    So I thought it should be a simple matter to write in the APIC ID3v2 tag with VBAccelerator's cID3v2 class, but it's just not working*. I've already searched but figured I'd ask.

    *-Or if anyone can see a problem with that,
    I took existing APIC tag data to figure out the byte structure, it's simply
    CvrData = "image/jpeg" & Chr(3) & LoadFile("file.jpg")
    with no termination; this produces a full tag identical to the valid reference mp3; the Chr(3) is for JPG format images.

    First the class has an issue with a length >65k, so I used smaller images (shouldn't matter no? cx=cy like referene)

    But it keeps corrupting it, inserting a null char in the JPG header, and I don't think that's the only problem either because every other tag becomes corrupt (to external programs, but not the class)

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Any ID3 class that supports APIC tag (cover art)?

    I know you're familiar with my Alpha Image Control. I have a class that attempts to extract APIC from MP3 files. Maybe the comments in that class can be helpful. Heck maybe your file won't work with my control either?

    Anyway, the class name in the control is: cFunctionsMP3 and the functions: pvParse3v3 & pvParse3v4. You seem to be working with v2, but the notes in my code (pvParse3v2) suggest APIC started with v3 and v2 used: PIC.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,714

    Re: Any ID3 class that supports APIC tag (cover art)?

    Well the issue isn't extracting APIC data, that's no problem, in fact I've already modified cID3v2 to dump the whole APIC tag to a text file on load for debugging purposes. Does you class write it too?

    The problem I'm having with the VBAccelerator class is that is absolutely will not write what I tell it to write in the APIC field, and I don't understand why. It keeps modifying the string I pass to it, adding a bunch of null chars-- The string (after the size) should be 0x0 0x0 0x0, and it replaces it with 6 nulls instead... I'm assuming it's because it converts from string to byte array with StrConv(vbFromUnicode)... but if I manually copy the bytes with CopyMemory, the tag bytes come out correct but the whole ID3 before it gets erased. I'm just not familiar enough with the ID3 format to figure out how to adjust writing it; way over my head honestly.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Any ID3 class that supports APIC tag (cover art)?

    Several years ago when I was developing the Alpha Image Control, I did do a lot of research on the various tag versions so I could extract images with full confidence, including handling of typical malformatted tags. However, that project is not a tag editor and does not write, only reads/extracts.

    In that project, class and functions I noted in previous post, I have lots of notes that may help? Here is the place where I got most of my information: http://www.id3.org/id3v2-00
    v3: http://www.id3.org/id3v2.3.0
    v4: http://www.id3.org/id3v2.4.0-structure

    Yes, you are probably having issues with string to binary conversions. I only ever work in binary within that project of mine, so all the notes in there are relative to byte offsets and heavy use of CopyMemory.

    And again, this may not be gospel... But while researching back then, I swear I've seen that APIC was NOT a v2 tag, rather PIC was. APIC began with v3. If that's true, I guess there is no harm adding APIC to v2, but strict v2 readers will just pass up the tag. Realize this is all v2, but talking about the .0-.4 revisions
    Last edited by LaVolpe; Aug 14th, 2017 at 06:55 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    Addicted Member
    Join Date
    Aug 2017
    Location
    South Africa (in the middle)
    Posts
    160

    Re: Any ID3 class that supports APIC tag (cover art)?

    Quote Originally Posted by LaVolpe View Post
    ...But while researching back then, I swear I've seen that APIC was NOT a v2 tag, rather PIC was. APIC began with v3. If that's true, I guess there is no harm adding APIC to v2, but strict v2 readers will just pass up the tag. Realize this is all v2, but talking about the .0-.4 revisions
    So far as I know, it's true.

    Never tried to extract or save the thumbnail.jpg either in any of my (few) "tagger" programs.
    Programmers are very patient people....while programming....but don't expect them to be patient all the time

  6. #6
    Lively Member
    Join Date
    Sep 2016
    Location
    Texas panhandle
    Posts
    64

    Re: Any ID3 class that supports APIC tag (cover art)?

    Audiogenie is perhaps one of the best taggers I've used. Supports Mp3 ID3V1/V2 tags (including APIC). It also supports
    other formats (OGG, APE, FLAC, and others). The Non ActiveX Dll is here:
    http://sourceforge.net/projects/audiogenie/?source=dlp

    Also, here is a VB6 class that makes it easy to use the above dll.
    http://en.sourceforge.jp/projects/sf...udioGenie.cls/

    Notes:
    Always use AUDIOAnalyzeFile before using any of its various functions and
    e.g. ID3V2SaveChanges for saving changes to an mp3's ID3V2 tag. I would also recommend
    making copies of a few mp3 files while testing for safety.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,714

    Re: Any ID3 class that supports APIC tag (cover art)?

    The link to the VB class doesn't work

  8. #8
    Fanatic Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    578

    Re: Any ID3 class that supports APIC tag (cover art)?

    I used AudioGenie for quite a while, but started to run into its limitations. New audio formats are lost to AudioGenie.

    This may be a bit more than you wanted but I now use all the time Tags Library by 3delite. It is written in delphi but comes with a BassTags.bas that Bonnie transcribed for me, it also comes with a VB class created by Eric Weiss.

    https://www.3delite.hu/Object%20Pasc...gsLibrary.html

  9. #9
    Fanatic Member
    Join Date
    Aug 2013
    Posts
    806

    Re: Any ID3 class that supports APIC tag (cover art)?

    Quote Originally Posted by fafalone View Post
    The link to the VB class doesn't work
    Looks like VBClassic's link got botched. Try this one:

    https://sourceforge.net/projects/aud...0/wrapper/VB6/

    That's the VB6 wrapper that's distributed with Audiogenie itself, I believe.

    This may be a bit more than you wanted but I now use all the time Tags Library by 3delite. It is written in delphi but comes with a BassTags.bas that Bonnie transcribed for me, it also comes with a VB class created by Eric Weiss.
    Thanks for sharing, Steve. Speaking of Bonnie, has anyone seen her around lately? It feels like it's been ages since she posted anything...
    Check out PhotoDemon, a pro-grade photo editor written completely in VB6. (Full source available at GitHub.)

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,714

    Re: Any ID3 class that supports APIC tag (cover art)?

    Oh ok if the broken link is to the official included audiogenie class I got it.

    That and especially Tags Library look great, thanks guys.

    The existing art taggers I've found have been very painful, so I'm looking to roll my own, like the art/info taggers I've already made for TV series and movies.

    It looks like the best databases to use are Discogs and MusicBrainz... any other recommendations (that include the album covers)? freedb has been troublesome in a couple programs now but I am aware of that one too.
    And if anyone has seen existing code that connects to a db like that to search, that would be helpful too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width