Skip to content

Commit

Permalink
One more fix to tile-wise conversion check
Browse files Browse the repository at this point in the history
Always perform tile-wise conversion if precompressed conversion
was requested, independent of the format and presence of image pyramid.
  • Loading branch information
melissalinkert committed Aug 8, 2024
1 parent d341f4c commit 1093102
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1268,16 +1268,13 @@ private boolean isTiledWriter(IFormatWriter writer, String outputFile)
private boolean doTileConversion(IFormatWriter writer, String outputFile)
throws FormatException
{
MetadataStore r = reader.getMetadataStore();
if ((r instanceof IPyramidStore) && ((IPyramidStore) r).getResolutionCount(reader.getSeries()) > 1) {
// if we asked to try a precompressed conversion,
// then the writer's tile sizes will have been set automatically
// according to the input data
// the conversion must then be performed tile-wise to match the tile sizes,
// even if precompression doesn't end up being possible
if (precompressed) {
return true;
}
// if we asked to try a precompressed conversion,
// then the writer's tile sizes will have been set automatically
// according to the input data
// the conversion must then be performed tile-wise to match the tile sizes,
// even if precompression doesn't end up being possible
if (precompressed) {
return true;
}
return DataTools.safeMultiply64(width, height) >= DataTools.safeMultiply64(4096, 4096) ||
saveTileWidth > 0 || saveTileHeight > 0;
Expand Down

0 comments on commit 1093102

Please sign in to comment.