/*
* If the image output type supports compression, set it to the highest
* maximum
*/
ImageWriterParams writerParams =
FindAnnotation.findAnnotation(annotations, ImageWriterParams.class);
if (writerParams != null)
{
if (param.canWriteCompressed())
{
param.setCompressionMode(writerParams.compressionMode());
param.setCompressionQuality(writerParams.compressionQuality());
}
}
else if (param.canWriteCompressed())
{
param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);