Skip to content

Commit

Permalink
One more check for performing tile-wise conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Aug 13, 2024
1 parent f6a0c75 commit 29e8c05
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,14 @@ private boolean doTileConversion(IFormatWriter writer, String outputFile)
if (precompressed) {
return true;
}
// tile size has already been set in the writer,
// so tile-wise conversion should be performed
// independent of image size
if ((writer.getTileSizeX() > 0 && writer.getTileSizeX() < width) ||
(writer.getTileSizeY() > 0 && writer.getTileSizeY() < height))
{
return true;
}
return DataTools.safeMultiply64(width, height) >= DataTools.safeMultiply64(4096, 4096) ||
saveTileWidth > 0 || saveTileHeight > 0;
}
Expand Down

0 comments on commit 29e8c05

Please sign in to comment.