Sets the
TIFFCompressor
object to be used by the
ImageWriter
to
encode each image strip or tile. A value of
null
allows the writer to choose its
own TIFFCompressor.
Note that invoking this method is not sufficient to set the compression type:
ImageWriteParam#setCompressionType(String) must be invoked
explicitly for this purpose. The following code illustrates the correct procedure:
TIFFImageWriteParam writeParam;
TIFFCompressor compressor;
writeParam.setCompressionMode(writeParam.MODE_EXPLICIT);
writeParam.setTIFFCompressor(compressor);
writeParam.setCompressionType(compressor.getCompressionType());
If
compressionType
is set to a value different from that supported by the
TIFFCompressor
then the compressor object will not be used.
If the compression type supported by the supplied TIFFCompressor
is not among
those in
ImageWriteParam#compressionTypes, then it will
be appended to this array after removing any previously appended compression type. If
compressor
is null
this will also cause any previously appended type to
be removed from the array.