Skip to content

Main content

IIIF Range One Canvas Duration Term Tool

Calculate iiif range one canvas duration term from explicit caller-supplied inputs.

Loading tool…

Description

Return source and playback durations for one canvas range.

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 source and playback durations for one canvas range.

When to use this tool

Use IIIF Range One Canvas Duration Term when checking the stated image-region, scaling or media-range convention.

How to use the tool and how it works

  1. Enter startSeconds, endSeconds, playbackRate. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read sourceDuration, playbackDuration. Use the output convention below.

Return source and playback durations for one canvas range. Require 0 <= startSeconds <= endSeconds and positive playbackRate; sourceDuration = end-start, playbackDuration = sourceDuration/rate.1

Input fieldMeaning and unitsAccepted input
startSecondsStart SecondsRequired. Finite number; minimum 0.
endSecondsEnd SecondsRequired. Finite number.
playbackRatePlayback RateRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
sourceDurationSource DurationRequired. Finite number.
playbackDurationPlayback DurationRequired. Finite number.
json
{
  "input": {
    "startSeconds": 10,
    "endSeconds": 40,
    "playbackRate": 1.5
  },
  "output": {
    "sourceDuration": 30,
    "playbackDuration": 20
  }
}

Limitations and assumptions

  • No media metadata or playback behavior is inspected, and zero-duration ranges are accepted.
  • 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

  1. Calculation and input contract: digital-humanities/iiif-range-one-canvas-duration-term — tool.io

Similar or alternative tools