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 🙏

© 2026 – Pkg Stats / Ryan Hefner

rawtherapee

v1.0.0

Published

rawtherapee-cli wrapper to process RAW images in NodeJs

Readme

node-rawtherapee

Simple wrapper for rawtherapee-cli with Promises

Warning: rawtherapee-cli use all available core in your system to process images. Running multiple instances at the same time may bloat your server. It's recomanded to use a task manager and process them one-by-one.

Dependencies

Rawtherapee must be installed in the host system and rawtherapee-cli must be directly executable from the command-line.

Installaton

With npm:

npm i --save rawtherapee

With yarn

yarn add rawtherapee

Usage

Promise = rawtherapee(url | array targets [, object options])

  • targets: files or directories
  • options: simple options Object

Options

replace

default: false

Replace the existing output file.

allFormats

default: false

Process all raw and non raw formats, igroring GUI parameters.

presets

default: ['default']

An array of pp3 presets files.

Possible opions:

  • 'default': use the default preset selected in GUI.
  • 'sidecar': use the sidecar file of each image if available
  • 'sidecar-strict': like 'sidecar, but return an error if there is no sidecar.
  • <uri>: any pp3 file in your system

rawtherapee-cli always use the neutral presets as base, then apply presets in the order you passed it.

ignoreBadPreset

default: false

If set to false, any non-existing preset file passed to the presets parameter will throw an error.
If set to true, those files will be ignored (not passed to rawtherapi-cli) and print message in sterr if the DEBUG environment variable is set to any value.

output

default: '.'

File or directory where the processed files will be stored (directory must exists).

format

default: 'jpg'

Possibles options:

'jpg', 'png' or 'tiff'

depth

default: 8

Color depth of the output file. Only for TIFF and PNG formats.

Possibles options:

8 or 16

compression

default: 90

Only for JPG output formats (PNG compression is hardcoded at 6 in rawtherapi-cli)

subSampling

string or int

default:2

Possibles options:

  • '4:2:2' or 1
  • '4:2:0' or 2
  • '4:4:4' or 3

zip

boolean

default: false

Use TIFF zip compression.

onChange

function default: () => {}

Callback function fired every time the status is updated (not using EventListeners) :

Return a simple object who always contains status, and maybe file or code.

Status can be :

  • start: start running rawtherapee-cli.
  • skipped: skip ignored file in a full directory process.
  • processing: start processing file.
  • complete: processing file completed.
  • idle: rawtherapee-cli stop with code code.

Examples

const rawtherapee = require('rawtherapee')

rawtherapee('/somewhere/something.NEF')
  .then((files) => {
    console.log(files.length, 'files processed.')
  })
const fs = require('fs')
const rawtherapee = require('rawtherapee')

const output = '/tmp/img'

if (!fs.existsSync(output)) fs.mkdirSync(output)

const onChange = (state) => {
  switch (state.status) {
    case 'complete':
      console.log(state.file, 'process done.')
      break
    case 'skipped':
      console.log(state.file, 'have been ignored.')
      break
    default:
      console.log('Event', state.status, 'fired.', state)
  }
}

rawtherapee([
  '/somewhere/something.NEF',
  '/somewhereelse/somethingelse.NEF'
], {
  onChange,
  output,
  format: 'tiff',
  depth: 16,
  zip: true,
  preset: ['sidecar']
})
  .then((files) => console.log(files.length, 'files processed.'))