Add readme, add float representation to rationals
This commit is contained in:
@@ -8,8 +8,9 @@ fn map_to_value(tag: exif::Tag, value: exif::Value) -> Value {
|
||||
}
|
||||
if let exif::Value::Rational(rs) = value {
|
||||
return serde_json::json!({
|
||||
"num": Value::Number(rs[0].num.into()),
|
||||
"denom": Value::Number(rs[0].denom.into()),
|
||||
"num": rs[0].num,
|
||||
"denom": rs[0].denom,
|
||||
"f64": rs[0].to_f64(),
|
||||
});
|
||||
}
|
||||
Value::String(value.display_as(tag).to_string())
|
||||
|
||||
Reference in New Issue
Block a user