Description
Return an in-image rectangle's area fraction.
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.
Return an in-image rectangle's area fraction.
When to use this tool
Use IIIF Region Area Share when checking the stated image-region, scaling or media-range convention.
How to use the tool and how it works
- Enter x, y, regionWidth, regionHeight, imageWidth, imageHeight. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read share. Use the output convention below.
Return an in-image rectangle's area fraction. Require positive image dimensions and a contained nonnegative rectangle; share = (regionWidth/imageWidth)*(regionHeight/imageHeight).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| x | X | Required. Finite number; minimum 0. |
| y | Y | Required. Finite number; minimum 0. |
| regionWidth | Region Width | Required. Finite number; minimum 0. |
| regionHeight | Region Height | Required. Finite number; minimum 0. |
| imageWidth | Image Width | Required. Finite number; strictly above 0. |
| imageHeight | Image Height | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| share | Dimensionless ratio on the explicitly stated numerator and denominator basis. | Required. Finite number. |
{
"input": {
"x": 10,
"y": 20,
"regionWidth": 40,
"regionHeight": 20,
"imageWidth": 100,
"imageHeight": 100
},
"output": {
"share": 0.08000000000000002
}
} Limitations and assumptions
- This is geometric area support, not visual importance, OCR coverage or image quality.
- 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 Edge Precision Token
Round and clip a supplied region axis.
- IIIF Region Normalized Offset
Normalize an in-bounds rectangle to image fractions.