Skip to content

Main content

IIIF Image Rotation Mirror Token Tool

Serialize an explicit IIIF image rotation angle in degrees with an optional leading mirror marker without transforming an image.

Loading tool…

Description

Format a supplied IIIF-style rotation token with an optional mirror marker.

Digital editions separate source readings, editorial uncertainty, witness locators, image requests, identifiers and rights statements. XML character/attribute rules differ from display labels, while URI fragments and TEI pointers need their target-document context. An identifier key or formatted token does not authenticate a witness, validate an edition or authorize reuse.

Format a supplied IIIF-style rotation token with an optional mirror marker.

When to use this tool

Use IIIF Image Rotation Mirror Token when you already have rotationDegrees, mirror and need to format a supplied IIIF-style rotation token with an optional mirror marker.

How to use the tool and how it works

  1. Enter rotationDegrees, mirror. 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 rotationToken. Use the output convention below.

Require rotationDegrees in [0,360]; use its numeric spelling, expanding negative-exponent notation into decimal digits, and prefix ! when mirror=true.1

The rotation token specifies clockwise degrees; a leading exclamation mark requests reflection across the vertical axis before rotation. Formatting that token does not transform an image or verify server support.2

Input fieldMeaning and unitsAccepted input
rotationDegreesNumber in [0,360] formatted as decimal text; scientific negative-exponent spelling is expanded.Required. Finite number; minimum 0; maximum 360.
mirrorPrefix ! for the IIIF-style mirror request; no image operation occurs.Required. Boolean.
Output fieldInterpretationReturned shape
rotationTokenRotation TokenRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "rotationDegrees": 90,
    "mirror": true
  },
  "output": {
    "rotationToken": "!90"
  }
}

Limitations and assumptions

  • No image is transformed and no complete IIIF request or server support is validated. Zero and 360 are retained distinctly; the token records the requested representation.
  • 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

Validate the complete XML/TEI document or IIIF request when technical conformance matters, and inspect the original witness and rights record for editorial use. Preserve uncertain readings, source order and attribution rather than treating local tokens as verified scholarly interpretations.

References

  1. Calculation and input contract: digital-humanities/iiif-image-rotation-mirror-token — tool.io

  2. IIIF Image API 3.0: Rotation — IIIF Consortium

Similar or alternative tools