{"id":26041784,"url":"https://github.com/zuf/libraw.cr","last_synced_at":"2026-05-29T08:03:17.351Z","repository":{"id":281040657,"uuid":"944011235","full_name":"zuf/libraw.cr","owner":"zuf","description":"Crystal bindings to libraw","archived":false,"fork":false,"pushed_at":"2025-03-06T16:38:12.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T17:39:07.060Z","etag":null,"topics":["crystal-lang","libraw"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zuf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.CDDL","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":"2025-03-06T16:29:01.000Z","updated_at":"2025-03-06T16:38:16.000Z","dependencies_parsed_at":"2025-03-06T23:00:34.652Z","dependency_job_id":null,"html_url":"https://github.com/zuf/libraw.cr","commit_stats":null,"previous_names":["zuf/libraw.cr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zuf/libraw.cr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuf%2Flibraw.cr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuf%2Flibraw.cr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuf%2Flibraw.cr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuf%2Flibraw.cr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuf","download_url":"https://codeload.github.com/zuf/libraw.cr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuf%2Flibraw.cr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33642318,"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-05-29T02:00:06.066Z","response_time":107,"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":["crystal-lang","libraw"],"created_at":"2025-03-07T14:48:58.672Z","updated_at":"2026-05-29T08:03:17.333Z","avatar_url":"https://github.com/zuf.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libraw bindings to crystal\n\n[Libraw](https://www.libraw.org/) allow you to load, parse and process virtyally any raw photo.\n\n## Status of this project\n\nAlmost all functions and types has low level bindings (LibRawC) from original libraw with thin wrapper via LibRaw class.\nBut there are no higher layer wrapper yet (TBD).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     librawcr:\n       github: zuf/libraw.cr\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"libraw\"\n\nraw_photo_file = \"/path/to/photo.cr2\"\n\nlibraw = LibRaw.new(raw_photo_file)\nputs \"#{String.new libraw.iparams.make.to_unsafe} #{String.new libraw.iparams.model.to_unsafe} #{String.new libraw.lensinfo.lens.to_unsafe}  | #{libraw.raw_height} x #{libraw.raw_width} ISO=#{libraw.imgother.iso_speed} S=#{libraw.imgother.shutter} A=#{libraw.imgother.aperture} T=#{Time.unix libraw.imgother.timestamp} N=#{libraw.imgother.shot_order}\"\n\n# Extract thumbnail from raw and save as separate file\nlibraw.unpack_thumb\nputs \"Thumbnail info: #{libraw.thumbnail.tformat} #{libraw.thumbnail.twidth} x #{libraw.thumbnail.theight} colors: #{libraw.thumbnail.tcolors} #{libraw.thumbnail.tlength.humanize_bytes}\"\n\n# Assume thumbnail in jpeg format (most common case).\n# See also https://www.libraw.org/docs/API-datastruct-eng.html#LibRaw_thumbnail_formats\nFile.write \"/tmp/photo_thumbnail.jpg\", libraw.tumbnail_bytes\n\n# unpack raw data\nlibraw.unpack\nlibraw.dcraw_process\n\n# Save as uncompressed rgb data\nlibraw.dcraw_ppm_tiff_writer \"/tmp/photo.ppm\"\n```\n\n## Licensing\n\nAs the original LibRaw library this bindings is distributed free of charge and with open-source code subject to two licenses:\n\n1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1\n\n2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuf%2Flibraw.cr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuf%2Flibraw.cr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuf%2Flibraw.cr/lists"}