From 02b40e1ca56f8d41ca1e267d89a6846bce8e81e3 Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Sun, 24 Feb 2019 17:46:47 +0200 Subject: [PATCH] Minor doc tweaks --- src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2c5a839..cdd09d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,11 @@ use std::path::Path; use std::error::Error; -/// Embed the image from `image_filename` into `music_filename`, in-place. Any error reading ID3 +/// Embed the image from `image_filename` into `music_filename`, in-place. Any errors reading ID3 /// tags from the music file or parsing the image get propagated upwards. /// -/// The image is encoded as a JPEG with a 90% quality setting. It's embedded as a "Front cover". +/// The image is encoded as a JPEG with a 90% quality setting, and embedded as a "Front cover". +/// Tags get written as ID3v2.3. /// pub fn embed_image(music_filename: &Path, image_filename: &Path) -> Result<(), Box> { let mut tag = id3::Tag::read_from_path(&music_filename). @@ -30,8 +31,8 @@ pub fn embed_image(music_filename: &Path, image_filename: &Path) -> Result<(), B Ok(()) } -/// Extract the first found embedded image from `music_filename` and write as a file with the given -/// `image_filename`. The image file will be silently overwritten if it exists. +/// Extract the first found embedded image from `music_filename` and write it as a file with the +/// given `image_filename`. The image file will be silently overwritten if it exists. /// /// Any errors from parsing id3 tags will be propagated. The function will also return an error if /// there's no embedded images in the mp3 file.