Methods that return a Ratio, such as get_tag_rational and get_exposure_time, currently mangle the data by returning the rational in reduced (simplified) form. That is to say, an original value like 16/8 will be returned as 2/1.
The fix should be as simple as switching from Ratio::new() to Ratio::new_raw(), along with checking for a 0 denominator.
Methods that return a
Ratio
, such asget_tag_rational
andget_exposure_time
, currently mangle the data by returning the rational in reduced (simplified) form. That is to say, an original value like 16/8 will be returned as 2/1.The fix should be as simple as switching from
Ratio::new()
toRatio::new_raw()
, along with checking for a 0 denominator.