ly.img.android.pesdk.backend.exif / ExifTagInfo / getValueAsRational

getValueAsRational

open 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.

Parameters

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.

open 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.

Parameters

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.