Description
Convert one percent region axis to outward-rounded pixel bounds.
IIIF-related selectors describe image regions, canvas coordinates and media intervals. A local arithmetic helper can use a restricted syntax or rounding convention while a full IIIF request must satisfy the API and server behavior.
Convert one percent region axis to outward-rounded pixel bounds.
When to use this tool
Use IIIF Region Percent Pixel One Axis when checking the stated image-region, scaling or media-range convention.
How to use the tool and how it works
- Enter dimension, startPercent, extentPercent. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read startPixel, endPixel, extentPixels. Use the output convention below.
Convert one percent region axis to outward-rounded pixel bounds. Require positive whole dimension, startPercent >= 0, extentPercent > 0 and their sum <= 100; floor the start, ceil the end and return their difference.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| dimension | Dimension | Required. Safe integer; minimum 1. |
| startPercent | Start Percent Unit: %. | Required. Finite number; minimum 0. |
| extentPercent | Extent Percent Unit: %. | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| startPixel | Outward-rounded lower pixel edge using floor. | Required. Safe integer. |
| endPixel | Outward-rounded upper pixel edge using ceil. | Required. Safe integer. |
| extentPixels | Extent Pixels | Required. Safe integer. |
{
"input": {
"dimension": 1000,
"startPercent": 12.5,
"extentPercent": 25
},
"output": {
"startPixel": 125,
"endPixel": 375,
"extentPixels": 250
}
} Limitations and assumptions
- This is one explicit rounding convention, not complete IIIF server behavior or a two-axis request.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a conforming IIIF client and actual manifest or image information for complete request validation and resource access.
References
Similar or alternative tools
- IIIF Region Normalized Offset
Normalize an in-bounds rectangle to image fractions.
- IIIF Region Edge Precision Token
Round and clip a supplied region axis.