othmar52 / slimpd

PHP/JS based MPD-web-client for large music collections
GNU Affero General Public License v3.0
41 stars 11 forks source link

Extracting embedded images in id3v2 COVERART_UUENCODED #50

Open othmar52 opened 7 years ago

othmar52 commented 7 years ago

Some files does have embedded images in $tags['id3v2']['text']['COVERART_UUENCODED'] How to decode these encoded strings to a useable bitmap?

running

convert_uudecode($tags['id3v2']['text']['COVERART_UUENCODED']);

of testfile-with-COVERART_UUENCODED.mp3.zip returns about 26K lines like

M7SA?7T%*6U$E6$DU1B`@,"DI2C0@*"`@("`J("`O(2`B("8@("`@("8@($`@
M,"$@(B`O("`@("`L("!`(#(A(",@(2`@("`@(2`@("`Z(2`E("$@("`@(#L@
M($`@.R$@)2`A("`@("!#("!`($@A(",@(2`@("`@(B`@("!1(2`B(#P@("`@
...
M2BU)*$M&.R<S3CA73D@U)$M"2C1`,B!!320G6DDE)"Y5)4,W.%0N7E\@5E)0
M420I-B$G+#PY7D9>2T%7)#M3)TU-+254(EDB("E-65PK03-`7R!<6S@Q0BY?
$7SLY4```
`