fun getValueAsRational(defaultValue: long): Rational
Gets the value as a Rational. If there are more than 1 Rationals in this value, gets the first one. This method should be used for tags of type #TYPE_RATIONAL
or #TYPE_UNSIGNED_RATIONAL
.
defaultValue
- long: the numerator of the Rational to return if tag's value does not exist or cannot be converted to a Rational (the denominator will be 1).
Return
Rational: the tag's value as a Rational, or the defaultValue.
fun getValueAsRational(defaultValue: Rational): Rational
Gets the value as a Rational. If there are more than 1 Rationals in this value, gets the first one. This method should be used for tags of type #TYPE_RATIONAL
or #TYPE_UNSIGNED_RATIONAL
.
defaultValue
- Rational: the Rational to return if tag's value does not exist or cannot be converted to a Rational.
Return
Rational: the tag's value as a Rational, or the defaultValue.