Select attached picture by picture type

Locked
WaldoMonster
getID3() contributor
Posts:112
Joined:Mon Apr 01, 2002 12:20 am
Location:Netherlands
Contact:
Select attached picture by picture type

Post by WaldoMonster » Thu Mar 26, 2009 8:57 pm

Alternatively select an attached mp3 APIC or flac PICTURE by picture type.

An implementation could be something like this:
First image: ['id3v2']['APIC'][0]
Cover back : ['id3v2']['APIC']['PICTURE_TYPE'][4]

Another way to implement it is to read out the PICTURE_TYPE by index.
Can something like this be implemented?

Thanks,

Willem




Reference:
http://www.id3.org/d3v2.3.0
http://flac.sourceforge.net/format.html ... ck_picture

Picture type:
00 Other
01 32x32 pixels 'file icon' (PNG only)
02 Other file icon
03 Cover (front)
04 Cover (back)
05 Leaflet page
06 Media (e.g. lable side of CD)
07 Lead artist/lead performer/soloist
08 Artist/performer
09 Conductor
0A Band/Orchestra
0B Composer
0C Lyricist/text writer
0D Recording Location
0E During recording
0F During performance
10 Movie/video screen capture
11 A bright coloured fish
12 Illustration
13 Band/artist logotype
14 Publisher/Studio logotype

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Select attached picture by picture type

Post by James Heinrich » Thu Mar 26, 2009 9:22 pm

Sorry, I don't think I grasp your request...
Right now APICs are returned in (for example)
[id3v2][APIC][0][data] // image data
[id3v2][APIC][0][picturetypeid] // picture type

What would you like to see changed?

WaldoMonster
getID3() contributor
Posts:112
Joined:Mon Apr 01, 2002 12:20 am
Location:Netherlands
Contact:

Re: Select attached picture by picture type

Post by WaldoMonster » Thu Mar 26, 2009 9:31 pm

James Heinrich wrote:[id3v2][APIC][0][picturetypeid] // picture type
Sorry, the live demo didn't show the picturetypeid.

WaldoMonster
getID3() contributor
Posts:112
Joined:Mon Apr 01, 2002 12:20 am
Location:Netherlands
Contact:

Re: Select attached picture by picture type

Post by WaldoMonster » Thu Mar 26, 2009 10:46 pm

I have looked into the getID3() code and missing the (picture)typeid for the FLAC PICTURE.
Can this be added in the next release?
For the rest it is working as expected.

GetID3() v 1.79
module.tag.id3v2.php
['id3v2']['APIC'][0]['picturetype']
['id3v2']['APIC'][0]['picturetypeid']

module.audio.flac.php
['flac']['PICTURE'][0]['type']
['flac']['PICTURE'][0]['typeid']


GetID3() v2.0.0b5
module.tag.id3v2.php
['id3v2']['APIC'][0]['picturetype']
['id3v2']['APIC'][0]['picturetypeid']

module.audio.xiph.php
['flac']['PICTURE'][0]['type']
['flac']['PICTURE'][0]['typeid']

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Select attached picture by picture type

Post by James Heinrich » Thu Mar 26, 2009 11:08 pm

Very easy change, will be in next release.
Attachments
module.audio.xiph.php
v2.0.x
(40.11KiB)Downloaded 1037 times
module.audio.flac.php
v1.7.x
(16.44KiB)Downloaded 1192 times

WaldoMonster
getID3() contributor
Posts:112
Joined:Mon Apr 01, 2002 12:20 am
Location:Netherlands
Contact:

Re: Select attached picture by picture type

Post by WaldoMonster » Thu Mar 26, 2009 11:25 pm

Thanks for the updates!

Locked