diff --git a/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java b/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java index 3a78585..fcaa43a 100755 --- a/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java +++ b/src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java @@ -716,8 +716,7 @@ private void convertPyramid(PyramidSeries s) currentIndex, currentResolution); } else { - // pad the tile to the correct width and height - int paddedHeight = tileBytes.length / region.width; + // padded tile, use descriptor X and Y tile size byte[] realTile = new byte[descriptor.tileSizeX * descriptor.tileSizeY]; int totalRows = region.height;