public class TIFFRational extends Object
TIFFTag
).
For more information on TIFF's internals, see TIFFCodec
, which lists a few links
to TIFF specification documents.Modifier and Type | Field | Description |
---|---|---|
private int |
denominator |
|
private int |
numerator |
Constructor | Description |
---|---|
TIFFRational(int numerator,
int denominator) |
Creates a TiffRational object from the arguments.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
public TIFFRational(int numerator, int denominator)
numerator
- the numerator of the fraction stored in this objectdenominator
- the denominator of the fraction stored in this objectIllegalArgumentException
- if denominator is 0
(division by zero is not allowed)public int getDenominator()
public double getAsDouble()
double
value.getAsFloat()
public float getAsFloat()
float
value.getAsDouble()
public int getNumerator()