* @throws DjatokaException
*/
public void compressImage(InputStream input, OutputStream output,
DjatokaEncodeParam params) throws DjatokaException {
if (params == null)
params = new DjatokaEncodeParam();
File inputFile = null;
try {
inputFile = File.createTempFile("tmp", ".tif");
IOUtils.copyStream(input, new FileOutputStream(inputFile));
if (params.getLevels() == 0) {