Expand description
The picture inside an audio file, pulled out of it.
§Why this goes through lofty for every format
This crate parses FLAC, MP3, MP4 and Ogg itself, and reads the rest through
lofty. Those parsers exist because tag reading is the hot path — a scan
opens every file in the library — and because the fields they take are few
and stable.
Extraction is neither of those things. It runs once per folder, on demand,
and what it produces is written into somebody’s music library, where being
wrong is expensive and being slow is not. Four more hand-written extractors
— a FLAC PICTURE block, an ID3 APIC frame, an MP4 covr atom, a
base64-wrapped picture block inside an Ogg comment — would be four more
chances to write a corrupt file, to buy speed nobody is waiting for.
So one path, for every format, through a dependency this crate already
carries. What it hands back is still decoded and validated before anything
is written: see crate::coverart::write_image.
Structs§
- Extracted
- One picture out of a file, and where it went — or why it did not.
Functions§
- embedded
- The front cover inside a file, if it has one.
- extract_
extras_ into - Writes out every picture a file carries that is not the front cover.
- extract_
into - Takes the picture out of one file and writes it into a folder.
- pictures
- Every picture a file carries, each with what it is of.