{"id":18045312,"url":"https://github.com/dpb587/go-iiif-image-api-v3","last_synced_at":"2025-04-05T03:41:50.058Z","repository":{"id":222225080,"uuid":"756582645","full_name":"dpb587/go-iiif-image-api-v3","owner":"dpb587","description":"Data types and behaviors for the IIIF Image API 3.0 specification.","archived":false,"fork":false,"pushed_at":"2024-02-12T22:17:21.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T11:48:34.034Z","etag":null,"topics":["go","iiif","iiif-image","iiif-image-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpb587.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-12T22:17:08.000Z","updated_at":"2024-02-16T19:02:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"5030ac85-93eb-422d-82b2-b309cc2ac19b","html_url":"https://github.com/dpb587/go-iiif-image-api-v3","commit_stats":null,"previous_names":["dpb587/go-iiif-image-api-v3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgo-iiif-image-api-v3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgo-iiif-image-api-v3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgo-iiif-image-api-v3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgo-iiif-image-api-v3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpb587","download_url":"https://codeload.github.com/dpb587/go-iiif-image-api-v3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284914,"owners_count":20913691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","iiif","iiif-image","iiif-image-api"],"created_at":"2024-10-30T18:12:52.382Z","updated_at":"2025-04-05T03:41:50.040Z","avatar_url":"https://github.com/dpb587.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"A package focused on low-level data types and behaviors for the [IIIF Image API (v3)](https://iiif.io/api/image/3.0/) specification.\n\n* parsing `{region}/{size}/{rotation}/{quality}.{format}` parameter values;\n* validating parameters against advertised compliance levels, maximums, and extra features;\n* resolving relative parameter values against an image profile for absolute pixels;\n* converting parameter values to canonical form;\n* enumerating region+size based on static size or tile configuration; and\n* constructing basic `info.json` contents.\n\nThis package does not perform image processing. Resolved parameters should typically be used for performing upstream or RPC requests to dedicated image servers.\n\nLearn more from [code documentation](https://pkg.go.dev/github.com/dpb587/go-iiif-image-api-v3), [`examples`](examples), or `*_test.go` files.\n\n# Example\n\nThe following example is based on [`examples/parse/main.go`](examples/parse/main.go). Import the packages...\n\n```go\nimport (\n\tiiifimageapi \"github.com/dpb587/go-iiif-image-api-v3\"\n\t\"github.com/dpb587/go-iiif-image-api-v3/imagerequest\"\n)\n```\n\nAnd then use any of the functions necessary to process the request...\n\n```go\n// Params are the raw values, typically received as paths of an HTTP request.\nvar params = imagerequest.RawParams{\"pct:25,25,50,50\", \"max\", \"90\", \"color.png\"}\n\n// ParseParams extracts typed values from the raw parameters of an image\n// request and ensure they are valid values per the specification.\nparsedParams, err := imagerequest.ParseRawParams(params)\nif err != nil {\n  log.Fatalf(\"parsing params: %v\", err)\n}\n\n// Resolve validates parameters according to a specific image (e.g. profile/\n// feature support, region/size bounds), and converts any relative values into\n// an absolute form (e.g. pct:* to pixels, size upscaling, and quality).\nresolvedParams, err := parsedParams.Resolve(imagerequest.ResolveOptions{\n  ImageInformation: iiifimageapi.ImageInformation{\n    Profile: iiifimageapi.ComplianceLevel2Name,\n    Width:   3024,\n    Height:  4032,\n  },\n  DefaultQuality: \"color\",\n})\nif err != nil {\n  log.Fatalf(\"resolving params: %v\", err)\n}\n\n// Optionally refer to the canonical form of parameters (per specification).\ncanonicalParams := resolvedParams.Canonical()\n```\n\n# License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Fgo-iiif-image-api-v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpb587%2Fgo-iiif-image-api-v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Fgo-iiif-image-api-v3/lists"}