Class SKImagePyramidIiifSource
An ISKImagePyramidSource backed by an IIIF Image API v2/v3 info.json. Parses the IIIF descriptor and maps IIIF scale factors to pyramid levels, where level 0 = lowest resolution (largest scale factor) and level MaxLevel = full resolution.
public class SKImagePyramidIiifSource : ISKImagePyramidSource
- Inheritance
-
SKImagePyramidIiifSource
- Implements
- Inherited Members
Constructors
- SKImagePyramidIiifSource(string, int, int, int, int, int[], string, string)
Constructs an IIIF source from parsed parameters.
Properties
- AspectRatio
Image aspect ratio (width / height).
- BaseId
The IIIF base ID (@id) used to construct tile URLs.
- CacheExpiry
The recommended maximum age for cached tiles from this source. null means tiles are considered immutable (cache indefinitely). The controller passes this to the cache as a hint when loading a new source.
- Format
Image format (e.g. "jpg").
- ImageHeight
Full image height in pixels at maximum resolution.
- ImageWidth
Full image width in pixels at maximum resolution.
- MaxLevel
Maximum pyramid level index. Level 0 is lowest resolution.
- ScaleFactorsDescending
Scale factors in descending order (index 0 = lowest resolution level).
- SourceId
A stable, short identifier for this source derived from its content and base URI. Used as a directory name in disk-based tile caches to namespace tiles per image source.
- TileHeight
Tile height in pixels.
- TileWidth
Tile width in pixels.
Methods
- GetFullTileUrl(int, int, int)
Gets the full URL for a specific tile. Returns null if the source cannot resolve the URL (e.g., not yet loaded).
- GetLevelHeight(int)
Gets the image height at a given pyramid level.
- GetLevelWidth(int)
Gets the image width at a given pyramid level.
- GetOptimalLevel(double, double)
Gets the optimal pyramid level for the given viewport and control dimensions.
- GetTileBounds(int, int, int)
Gets the pixel bounds of a tile within its pyramid level. Returns a Rect<T> of int in level-pixel coordinates (XYWH). For formats without tile overlap (e.g., IIIF), the bounds are the exact tile dimensions. For DZI, the bounds include the configured overlap pixels.
- GetTileCountX(int)
Gets the number of tile columns at a given level.
- GetTileCountY(int)
Gets the number of tile rows at a given level.
- Parse(string)
Parses a IIIF Image API v2 or v3 info.json string.