Parses the four IIIF Image API 3.0 option segments
(region / size / rotation / quality.format) into a canonical
Image.Plug.Pipeline.
Inverse of Image.Components.URL.iiif/2. Targets Compliance Level
2 of the Image API 3.0
specification.
Built incrementally over Phases 3b–3d:
3b — region:
full|square|<x,y,w,h>|pct:<x,y,w,h>.3c — size:
max|^max|<w>,|,<h>|<w>,<h>|!<w>,<h>|pct:<n>plus^upscale prefixes.- 3d — rotation, quality, format.
Summary
Functions
Parses the four IIIF option segments into a Pipeline.
Functions
@spec parse( {String.t(), String.t(), String.t(), String.t()}, keyword() ) :: {:ok, Image.Plug.Pipeline.t()} | {:error, Image.Plug.Error.t()}
Parses the four IIIF option segments into a Pipeline.
Arguments
segmentsis a{region, size, rotation, quality_dot_format}four-tuple of strings, exactly as produced byImage.Plug.Provider.IIIF.URL.parse/2.parser_optionsis a keyword list.:strict?(defaulttrue) rejects malformed segments; with:strict?set tofalse, unrecognised segments are reported withLogger.warning/1and treated as their respective no-op (full/max/0/default).
Returns
{:ok, pipeline}on success.{:error, %Image.Plug.Error{}}on the first malformed segment.