Skip to content

Commit

Permalink
Fix "I/O error writing TIFF file!" when add noise
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenq committed Jul 26, 2018
1 parent 021c673 commit 41b0eab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/net/sourceforge/tessboxeditor/TiffBoxGeneratorFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private void saveMultipageTiff() throws IOException {
images[i] = ImageUtils.addNoise(images[i], noiseAmount);
}
}
ImageIOHelper.mergeTiff(images, tiffFile, isAntiAliased ? "LZW" : "CCITT T.6"); // CCITT T.6 for bitonal; LZW for others);
ImageIOHelper.mergeTiff(images, tiffFile, (isAntiAliased || noiseAmount != 0) ? "LZW" : "CCITT T.6"); // CCITT T.6 for bitonal; LZW for others);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
throw e;
Expand Down
2 changes: 1 addition & 1 deletion versionchanges.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Version 1.1.0 (1 July 2018)

Version 1.1.1 (25 July 2018)
- Fix NPE in Java 10
- Display severe exceptions
- Fix "I/O error writing TIFF file!" when add noise

0 comments on commit 41b0eab

Please sign in to comment.