int minY) {
// Create an InputStream from the compressed data array.
ByteArrayInputStream jpegStream = new ByteArrayInputStream(data);
// Create a decoder.
JPEGImageDecoder decoder = decodeParam == null ?
JPEGCodec.createJPEGDecoder(jpegStream) :
JPEGCodec.createJPEGDecoder(jpegStream,
decodeParam);
// Decode the compressed data into a Raster.
Raster jpegRaster;
try {
jpegRaster = colorConvert ?
decoder.decodeAsBufferedImage().getWritableTile(0, 0) :
decoder.decodeAsRaster();
} catch (IOException ioe) {
throw new RuntimeException("TIFFImage13");
}
// Translate the decoded Raster to the specified location and return.