Skip to content

Commit

Permalink
Fix output offset calculation in tile row copying
Browse files Browse the repository at this point in the history
The output row length is always the full tile width.
  • Loading branch information
melissalinkert committed May 19, 2020
1 parent 7c293e9 commit 06fe2e8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,9 @@ private void convertPyramid(PyramidSeries s)
new byte[descriptor.tileSizeX * descriptor.tileSizeY];
int totalRows = region.height;
int inRowLen = tileBytes.length / totalRows;
int outRowLen = realTile.length / totalRows;
for (int row=0; row<totalRows; row++) {
System.arraycopy(tileBytes, row * inRowLen,
realTile, row * outRowLen, inRowLen);
realTile, row * descriptor.tileSizeX, inRowLen);
}
writeTile(s, currentPlane, realTile,
currentIndex, currentResolution);
Expand Down

0 comments on commit 06fe2e8

Please sign in to comment.