{"id":51028920,"url":"https://github.com/ivanglie/go-libraw","last_synced_at":"2026-06-21T22:02:18.403Z","repository":{"id":365452016,"uuid":"1263027553","full_name":"ivanglie/go-libraw","owner":"ivanglie","description":"Povides Go bindings for LibRaw, for reading and processing of RAW digicam images","archived":false,"fork":false,"pushed_at":"2026-06-17T10:52:05.000Z","size":73806,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T12:23:26.260Z","etag":null,"topics":["camera-raw","cgo","go","golang","image-processing","libraw","photography","raw","raw-image"],"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/ivanglie.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":"docs/support-matrix.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-08T14:51:32.000Z","updated_at":"2026-06-17T10:52:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ivanglie/go-libraw","commit_stats":null,"previous_names":["ivanglie/go-libraw"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ivanglie/go-libraw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanglie%2Fgo-libraw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanglie%2Fgo-libraw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanglie%2Fgo-libraw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanglie%2Fgo-libraw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanglie","download_url":"https://codeload.github.com/ivanglie/go-libraw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanglie%2Fgo-libraw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34627202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["camera-raw","cgo","go","golang","image-processing","libraw","photography","raw","raw-image"],"created_at":"2026-06-21T22:02:17.719Z","updated_at":"2026-06-21T22:02:18.395Z","avatar_url":"https://github.com/ivanglie.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-libraw\n\n![go-libraw project cover](assets/social-preview.png)\n\n[![CI](https://github.com/ivanglie/go-libraw/actions/workflows/ci.yml/badge.svg)](https://github.com/ivanglie/go-libraw/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/ivanglie/go-libraw/graph/badge.svg)](https://codecov.io/gh/ivanglie/go-libraw)\n[![Go Reference](https://pkg.go.dev/badge/github.com/ivanglie/go-libraw/pkg/libraw.svg)](https://pkg.go.dev/github.com/ivanglie/go-libraw/pkg/libraw)\n\n`go-libraw` provides Go bindings to [LibRaw](https://www.libraw.org/docs)\nfor reading and processing of RAW digicam images.\n\n## Requirements\n\n`go-libraw` targets **Linux and macOS** (`amd64`, `arm64`). Windows is out of\nscope; see the [Support Matrix](docs/support-matrix.md) for details.\n\n- Go `1.26` or newer, as declared by `go.mod`\n- cgo enabled\n- LibRaw `0.21` or newer (`libraw-dev` or equivalent)\n- a C/C++ toolchain for the target platform\n\nInstall LibRaw on common platforms:\n\n```sh\n# macOS\nbrew install libraw\n\n# Debian/Ubuntu\nsudo apt-get update\nsudo apt-get install -y libraw-dev pkg-config\n\n# Fedora\nsudo dnf install LibRaw-devel pkgconf-pkg-config\n```\n\nVerify local discovery:\n\n```sh\nmake libraw-check\n```\n\nSee [LibRaw Build Setup](docs/libraw-build.md) and the\n[Support Matrix](docs/support-matrix.md) for platform details.\n\n## Quick Start\n\n```sh\ngo get github.com/ivanglie/go-libraw/pkg/libraw\n```\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\tlibraw \"github.com/ivanglie/go-libraw/pkg/libraw\"\n)\n\nfunc main() {\n\tprocessor, err := libraw.NewProcessor()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer func() {\n\t\tif err := processor.Close(); err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}()\n\n\tif err := processor.OpenFile(\"input.cr2\"); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif err := processor.Unpack(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif err := processor.DcrawProcess(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif err := processor.WritePPMTiff(\"output.ppm\"); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\nRun the bundled example on checked-in fixtures:\n\n```sh\nmake examples\nmake clean\n```\n\nThe sample commands are mapped to upstream LibRaw samples in\n[LibRaw Sample Parity Examples](docs/examples.md).\n\n## API Concepts\n\n- `Processor` owns one LibRaw handle. Create it with `NewProcessor`, then call\n  `Close` when finished.\n- Opening input with `OpenFile`, `OpenBuffer`, or `OpenBayer` prepares metadata\n  and decoder state.\n- Processing follows LibRaw order: open, optionally set params, `Unpack`,\n  `DcrawProcess` or lower-level image operations, then write or copy output.\n- `Metadata` returns a Go snapshot of LibRaw metadata and maker-note summaries.\n- Raw image, thumbnail, and memory image helpers return Go-owned data.\n- LibRaw error codes are returned as Go errors; use `ErrorCode` and `StrError`\n  when you need to inspect an underlying LibRaw status.\n\n## Documentation\n\n- [Lifecycle And Processing](docs/lifecycle-processing.md)\n- [Memory And Cgo Safety](docs/memory-and-cgo.md)\n- [API Coverage Guide](docs/api-coverage.md)\n- [Versioning Policy](docs/versioning.md)\n- [Release Checklist](docs/release-checklist.md)\n- [Upstream Sync](docs/upstream-sync.md)\n- [LibRaw API Inventory](docs/libraw-api-inventory.md)\n- [Metadata Coverage](docs/libraw-metadata-coverage.md)\n- [Maker-Notes Coverage](docs/libraw-maker-notes-coverage.md)\n- [Output And Raw Params Coverage](docs/libraw-params-coverage.md)\n\n## Upstream Coverage\n\nThe generated inventory in [docs/libraw-api-inventory.md](docs/libraw-api-inventory.md)\ntracks LibRaw symbols from the fixture headers and marks each as `wrapped`,\n`internal`, `deferred`, `unsupported`, or `unmapped`. Run this before changing\ncoverage-related code:\n\n```sh\nmake check-api-inventory\n```\n\nTo regenerate the inventory after updating the coverage map:\n\n```sh\nmake api-inventory\n```\n\n## License\n\nThe Go binding code in this repository is licensed under the MIT License; see\n[LICENSE](LICENSE). That license covers only this project's own code.\n\n`go-libraw` links the third-party [LibRaw](https://www.libraw.org) library\n(dual-licensed CDDL-1.0 OR LGPL-2.1-or-later) and checks in copies of LibRaw's\npublic headers under `testdata/headers/libraw/`, which remain under LibRaw's\nlicense rather than MIT. Software you build and distribute from this binding\nlinks LibRaw and must satisfy LibRaw's license. See\n[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md) for the full attribution and\ndistribution notes (including static-linking guidance), and `licenses/` for the\ncomplete LibRaw license texts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanglie%2Fgo-libraw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanglie%2Fgo-libraw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanglie%2Fgo-libraw/lists"}