![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dcraw-vendored-linux
Advanced tools
This 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:
If you don't want to think about operating systems, consider installing dcrawr instead, which integrates these modules.
All the modules can be in the following way:
const dcraw = require('dcraw-vendored-linux');
const { promisify } = require('util');
const { execFile } = require('child_process');
// call dcraw with any command line arguments you want
// bonus points: it's a promise now
promisify(execFile)(dcraw, ['-w', '-W', 'my-image.dng'])
.then(result => {
console.log(result);
}).catch(err => {
console.error(err);
});
You might also want to get the image returned in standard out rather than written to a file. You can follow these general rules:
const dcraw = require('dcraw-vendored-linux');
const { promisify } = require('util');
const { execFile } = require('child_process');
const fs = require('fs');
// -c will write the data to stdout
promisify(execFile)(dcraw, ['-c', 'my-image.dng'], {
// hide the extra window on Windows
windowsHide: true,
// we want the raw data, not a string
encoding: 'buffer',
// 8-bit PPMs are roughly 3x bigger than the original raw file
// so you should set this number fairly high
maxBuffer: 1024 * 1024 * 100
})
.then(result => {
// don't use the sync method... you get the idea though
fs.writeFileSync('./my-image.ppm', result.stdout);
}).catch(err => {
console.error(err);
});
The 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.
All 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.
The original dcraw
code by Dave Coffin 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.
To 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.
FAQs
precompiled ready to use dcraw binaries
The npm package dcraw-vendored-linux receives a total of 6 weekly downloads. As such, dcraw-vendored-linux popularity was classified as not popular.
We found that dcraw-vendored-linux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.