Skip to content

Commit 1093102

Browse files
One more fix to tile-wise conversion check
Always perform tile-wise conversion if precompressed conversion was requested, independent of the format and presence of image pyramid.
1 parent d341f4c commit 1093102

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

components/bio-formats-tools/src/loci/formats/tools/ImageConverter.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,16 +1268,13 @@ private boolean isTiledWriter(IFormatWriter writer, String outputFile)
12681268
private boolean doTileConversion(IFormatWriter writer, String outputFile)
12691269
throws FormatException
12701270
{
1271-
MetadataStore r = reader.getMetadataStore();
1272-
if ((r instanceof IPyramidStore) && ((IPyramidStore) r).getResolutionCount(reader.getSeries()) > 1) {
1273-
// if we asked to try a precompressed conversion,
1274-
// then the writer's tile sizes will have been set automatically
1275-
// according to the input data
1276-
// the conversion must then be performed tile-wise to match the tile sizes,
1277-
// even if precompression doesn't end up being possible
1278-
if (precompressed) {
1279-
return true;
1280-
}
1271+
// if we asked to try a precompressed conversion,
1272+
// then the writer's tile sizes will have been set automatically
1273+
// according to the input data
1274+
// the conversion must then be performed tile-wise to match the tile sizes,
1275+
// even if precompression doesn't end up being possible
1276+
if (precompressed) {
1277+
return true;
12811278
}
12821279
return DataTools.safeMultiply64(width, height) >= DataTools.safeMultiply64(4096, 4096) ||
12831280
saveTileWidth > 0 || saveTileHeight > 0;

0 commit comments

Comments
 (0)