From 14ce03d2a8e820a0819f857cc36209d51f2302e6 Mon Sep 17 00:00:00 2001 From: Gergely Csucs Date: Tue, 15 Jun 2021 18:37:29 +0200 Subject: [PATCH] https://github.com/usnistgov/pyramidio/issues/13 --- .../main/java/gov/nist/isg/pyramidio/TileBuilder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyramidio/src/main/java/gov/nist/isg/pyramidio/TileBuilder.java b/pyramidio/src/main/java/gov/nist/isg/pyramidio/TileBuilder.java index 6de2664..a5026fa 100644 --- a/pyramidio/src/main/java/gov/nist/isg/pyramidio/TileBuilder.java +++ b/pyramidio/src/main/java/gov/nist/isg/pyramidio/TileBuilder.java @@ -63,7 +63,14 @@ class TileBuilder { originalWidth = imageReader.getWidth(); originalHeight = imageReader.getHeight(); - String nameWithoutExtension = FilenameUtils.getBaseName(fileName); + /* + raw fix of https://github.com/usnistgov/pyramidio/issues/13 + 1) .dzi and _files have to match, even if happens to contain dot(s) + 2) in particular, CLI passes a stripped filename already + - "inputFileBaseName" https://github.com/usnistgov/pyramidio/blob/1d5c802fa8641cfdd00cdea02f416ea350edd92b/pyramidio-cli/src/main/java/gov/nist/isg/pyramidio/cli/Main.java#L91 + - "sbs.build(...,inputFileBaseName,...) https://github.com/usnistgov/pyramidio/blob/1d5c802fa8641cfdd00cdea02f416ea350edd92b/pyramidio-cli/src/main/java/gov/nist/isg/pyramidio/cli/Main.java#L135 + */ + String nameWithoutExtension = /*FilenameUtils.getBaseName(*/fileName/*)*/; String descriptorName = nameWithoutExtension + '.' + descriptorExt; DziFile dziFile = new DziFile(tileSize, overlap, tileFormat, originalWidth, originalHeight);