npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dcraw-vendored-linux

v9.28.2

Published

precompiled ready to use dcraw binaries

Downloads

26

Readme

dcraw vendored

travis appveyor

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);
  });

Versions

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.

License

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.