RationalNumber.valueOf(pixelDensity.getRawVerticalDensity()));
} else if (pixelDensity.isInInches()) {
directory.add(TiffTagConstants.TIFF_TAG_RESOLUTION_UNIT,
(short) 2);
directory.add(TiffTagConstants.TIFF_TAG_XRESOLUTION,
RationalNumber.valueOf(pixelDensity.horizontalDensityInches()));
directory.add(TiffTagConstants.TIFF_TAG_YRESOLUTION,
RationalNumber.valueOf(pixelDensity.verticalDensityInches()));
} else {
directory.add(TiffTagConstants.TIFF_TAG_RESOLUTION_UNIT,
(short) 1);