I'm attempting to read and save an APIC picture to file using taglib-ruby but I'm struggling to understand how to go about it. From what I can tell the image is 'image/jpeg' and ASCII-8BIT. Anyone tried to accomplish this?
Save MP3 ID3V2 APIC to jpeg file
480 views Asked by adamyonk At
2
There are 2 answers
0
On
This ended up solving the problem I was having - I wasn't understanding how to prep the extracted image for Paperclip. https://gist.github.com/adamyonk/5621295
You also asked that question in a taglib-ruby issue. The answer from there:
The documentation includes an example of reading the picture data, see TagLib::ID3v2::Tag examples.
Then just write the picture data into a file, e.g. like this:
You should also check the picture's MIME type using
cover.mime_type
and adjust the file extension accordingly.