Skip to content

Commit

Permalink
Let the percentiles be 0 based
Browse files Browse the repository at this point in the history
  • Loading branch information
atanas-balevsky committed Dec 22, 2023
1 parent aaf852b commit efe542f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terracotta/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_stretch_scale(scale: NumberOrString, metadata: Dict[str, Any]) -> int |
# can be a percentile
if scale.startswith("p"):
try:
percentile = int(scale[1:]) - 1
percentile = int(scale[1:])
except ValueError:
raise exceptions.InvalidArgumentsError(
f"Invalid percentile value: {scale}"
Expand Down

0 comments on commit efe542f

Please sign in to comment.