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

libraw.js

v3.0.0

Published

Provide a subset of LibRaw functionality.

Downloads

8

Readme

libraw.js

Installation

npm install --save libraw.js

Usage

import { LibRaw } from 'libraw.js';

const libRaw = new LibRaw();

await libRaw.openFile(rawImagePath);
const metadata = await libRaw.getMetadata();
await libRaw.unpackThumb();
const thumbnailBuffer = await libRaw.getThumbnail();

Summary

This module provides bindings for the popular LibRaw image library via the Node addon API. Releases are distributed with native builds for Ubuntu and macOS. Help with Windows support is solicited.

If you're trying to run this module on a different platform and are having trouble, please create an issue or pull request explaining the desired solution.

This module is in an experimental state and is untested in production environments. The primary focus at the moment is providing access to RAW metadata and thumbnails. We can add access to additional LibRaw API functionality as those use cases emerge.

Contributing

If you would like to contribute to the library please create a discussion issue first. Creating a large pull request without input from the maintainer could result in wasted effort for the author. There is plenty of work to be accomplished on this project, and contributions are welcome, but we also want to make sure the work going into the project is in line with its priorities.

Testing

Any API you implement or update should include new or revised tests to cover the functionality. The native code in the module is not tested. Because the native code is only intended to run in the context of this addon, all unit tests are performed against the TypeScript wrapper functions. Successfully running the test suite still requires building/running the native code. Unit tests are run with Jest.

The project includes two sample RAW images for use in testing.

API

libraw.js exports a class, LibRaw, that wraps some of the functionality of the processor class implemented by the native library. The class's API is documented in the docs directory.

Versioning

The major release versions of libraw.js mirror the major releases of LibRaw, starting with version 19.5. libraw.js adopts the recommended semantic versioning from npm.

Every new major version of LibRaw that libraw.js supports will result in a major version bump; minor versions are assigned likewise. For instance, increasing support from LibRaw version 0.19.5 to 0.19.6 would result in libraw.js changing from 1.0.0 to 1.1.0. Patch releases are assigned in the typical way.