net.sourceforge.jiu.codecs.tiff
Class TIFFRational
java.lang.Object
net.sourceforge.jiu.codecs.tiff.TIFFRational
public class TIFFRational
extends java.lang.Object
Data class to store a TIFF rational number.
A TIFF rational number is a fraction given by 32 bit integer numerator and denominator values.
It is one of the data types used in TIFF tags (
TIFFTag
).
For more information on TIFF's internals, see
TIFFCodec
, which lists a few links
to TIFF specification documents.
TIFFRational(int numerator, int denominator) - Creates a TiffRational object from the arguments.
|
double | getAsDouble() - Returns the fraction as a
double value.
|
float | getAsFloat() - Returns the fraction as a
float value.
|
int | getDenominator() - Returns the denominator value that was given to the constructor.
|
int | getNumerator() - Returns the numerator value that was given to the constructor.
|
denominator
private int denominator
numerator
private int numerator
TIFFRational
public TIFFRational(int numerator,
int denominator)
Creates a TiffRational object from the arguments.
numerator
- the numerator of the fraction stored in this objectdenominator
- the denominator of the fraction stored in this object
getAsDouble
public double getAsDouble()
Returns the fraction as a double
value.
- the fraction stored in this object
getAsFloat
public float getAsFloat()
Returns the fraction as a float
value.
- the fraction stored in this object
getDenominator
public int getDenominator()
Returns the denominator value that was given to the constructor.
getNumerator
public int getNumerator()
Returns the numerator value that was given to the constructor.