@Override
    public void writeImage(final BufferedImage src, final OutputStream os, TiffImagingParameters params) throws ImagingException, IOException {
        if (params == null) {
            params = new TiffImagingParameters();
        }
        new TiffImageWriterLossy().writeImage(src, os, params);
    }
Reads the content of a TIFF file that contains numerical data samples rather than image-related pixels.
<p>
If desired, sub-image data can be read from the file by using a Java {@code TiffImagingParameters} instance to specify the subsection of the image that
is required. The following code illustrates the approach:

<pre>
int x; // coordinate (column) of corner of sub-image
int y; // coordinate (row) of corner of sub-image
int width; // width of sub-image
int height; // height of sub-image

TiffImagingParameters params = new TiffImagingParameters();
params.setSubImageX(x);
params.setSubImageY(y);
params.setSubImageWidth(width);
params.setSubImageHeight(height);
TiffRasterData raster = readFloatingPointRasterData(directory, byteOrder, params);
</pre>

@param directory the TIFF directory pointing to the data to be extracted (TIFF files may contain multiple directories)
@param byteOrder the byte order of the data to be extracted
@param params    an optional parameter object instance
@return a valid instance
@throws ImagingException in the event of incompatible or malformed data
@throws IOException      in the event of an I/O error
src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java