{"id":26189071,"url":"https://github.com/catdad-experiments/dcraw-vendored","last_synced_at":"2026-03-17T14:59:23.385Z","repository":{"id":57211657,"uuid":"181102832","full_name":"catdad-experiments/dcraw-vendored","owner":"catdad-experiments","description":"👌 dcraw, already compiled for you","archived":false,"fork":false,"pushed_at":"2019-04-19T15:14:35.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T17:06:23.419Z","etag":null,"topics":["darwin","dcraw","images","linux","macos","npm-package","photography","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catdad-experiments.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-13T00:53:26.000Z","updated_at":"2020-01-10T13:18:07.000Z","dependencies_parsed_at":"2022-09-06T11:01:06.327Z","dependency_job_id":null,"html_url":"https://github.com/catdad-experiments/dcraw-vendored","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad-experiments%2Fdcraw-vendored","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad-experiments%2Fdcraw-vendored/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad-experiments%2Fdcraw-vendored/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catdad-experiments%2Fdcraw-vendored/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catdad-experiments","download_url":"https://codeload.github.com/catdad-experiments/dcraw-vendored/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136154,"owners_count":20241985,"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":["darwin","dcraw","images","linux","macos","npm-package","photography","windows"],"created_at":"2025-03-12T00:30:14.409Z","updated_at":"2025-12-24T14:25:43.215Z","avatar_url":"https://github.com/catdad-experiments.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dcraw vendored\n\n[![travis][travis.svg]][travis.link]\n[![appveyor][appveyor.svg]][appveyor.link]\n\n[travis.svg]: https://travis-ci.org/catdad-experiments/dcraw-vendored.svg?branch=master\n[travis.link]: https://travis-ci.org/catdad-experiments/dcraw-vendored\n[appveyor.svg]: https://ci.appveyor.com/api/projects/status/github/catdad-experiments/dcraw-vendored?branch=master\u0026svg=true\n[appveyor.link]: https://ci.appveyor.com/project/catdad/dcraw-vendored\n\nThis projects distributes the `dcraw` binary through a series of npm modules, in order to allow using the binaries through `child_process`. This project compiles and distributes binaries for the following operating systems:\n\n* Linux: [dcraw-vendored-linux](https://www.npmjs.com/package/dcraw-vendored-linux)\n* Windows: [dcraw-vendored-win32](https://www.npmjs.com/package/dcraw-vendored-win32)\n* MacOS: [dcraw-vendored-darwin](https://www.npmjs.com/package/dcraw-vendored-darwin)\n\nIf you don't want to think about operating systems, consider installing [dcrawr](https://www.npmjs.com/package/dcrawr) instead, which integrates these modules.\n\nAll the modules can be in the following way:\n\n```javascript\nconst dcraw = require('dcraw-vendored-linux');\nconst { promisify } = require('util');\nconst { execFile } = require('child_process');\n\n// call dcraw with any command line arguments you want\n// bonus points: it's a promise now\npromisify(execFile)(dcraw, ['-w', '-W', 'my-image.dng'])\n  .then(result =\u003e {\n    console.log(result);\n  }).catch(err =\u003e {\n    console.error(err);\n  });\n```\n\nYou might also want to get the image returned in standard out rather than written to a file. You can follow these general rules:\n\n```javascript\nconst dcraw = require('dcraw-vendored-linux');\nconst { promisify } = require('util');\nconst { execFile } = require('child_process');\nconst fs = require('fs');\n\n// -c will write the data to stdout\npromisify(execFile)(dcraw, ['-c', 'my-image.dng'], {\n  // hide the extra window on Windows\n  windowsHide: true,\n  // we want the raw data, not a string\n  encoding: 'buffer',\n  // 8-bit PPMs are roughly 3x bigger than the original raw file\n  // so you should set this number fairly high\n  maxBuffer: 1024 * 1024 * 100\n})\n  .then(result =\u003e {\n    // don't use the sync method... you get the idea though\n    fs.writeFileSync('./my-image.ppm', result.stdout);\n  }).catch(err =\u003e {\n    console.error(err);\n  });\n```\n\n## Versions\n\nThe versions of these packages will follow the versions of `dcraw` itself. For example, version `9.28` of `dcraw` will be published as `9.28.x`, with path versions reflecting updates to the surrounding module (likely related to the build, as there isn't much to the module itself). However, I do not know how `dcraw` itself is versioned, so I recommend pinning this dependency just in case.\n\nAll versions are compiled using `NODEPS`, so some functionality may not work. Please look at the original source code for information on what functionality is provided by dependencies. If you'd like to see any dependencies included, please feel free to submit a PR.\n\n## License\n\nThe original [`dcraw` code by Dave Coffin](https://www.cybercom.net/~dcoffin/dcraw/) is compiled without modifications. Regardless of modification, these modules are distributed under the GPL version 2 license, because that is what the header in the source code says and I do not want to get in trouble.\n\nTo the extent possible under law, I am waiving all copyright and related or neighboring rights to the build scripts and build-related code in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdad-experiments%2Fdcraw-vendored","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatdad-experiments%2Fdcraw-vendored","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatdad-experiments%2Fdcraw-vendored/lists"}