New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jpegicc

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpegicc

Node.js wrapper for Little CMS JpegICC

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

node-jpegicc v1.0.0

Wrapper for Little CMS JpegICC tool for stripping color profiles and changing image colorspace.

Basic Usage

var ICC = require("ICC");
var icc = new ICC();

icc.intent(2);
icc.quality("90");
icc.blackpointCompensation(true);
icc.process("test.jpg", "testout.jpg", function(err) {
	if (err) {
		console.log("JPEG ICC returned an error:");
		console.log(err);
		return;
	}
	console.log("Succesfully processed test.jpg");
});

Installation

npm install jpegicc

Also make sure jpegicc is installed. See Little CMS for binaries and a link to SourceForge, or download directly from SourceForge

They have precompiled binaries for some systems, if yours is not on the list or you prefer building manually:

./configure
make
make install

Or on a MAC with Homebrew

brew install littlecms

API Overview

Create a new ICC object

var ICC = require("ICC");

Apply any optional arguments with getter/setters (pass null to clear)

inputProfile                 <--  Input profile (defaults to sRGB)
outputProfile                <--  Output profile (defaults to sRGB)
intent                       <--  Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute)
blackpointCompensation       <--  Black point compensation (boolean)
preserveBlack                <--  Preserve black (CMYK only) 0=off, 1=black ink only, 2=full K plane
ignoreEmbeddedProfile        <--  Ignore embedded profile (boolean)
embedDestinationProfile      <--  Embed destination profile
saveEmbeddedProfile          <--  Save embedded profile as <new profile>
precalculatesTransform       <--  Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]
softProofProfile             <--  Soft proof profile
softProofIntent              <--  SoftProof intent
markOutOfGamutColors         <--  Marks out-of-gamut colors on softproof
quality                      <--  Output JPEG quality (0 - 100)
observerAdaptationState      <--  Observer adaptation state (abs.col. only)
verbose                      <--  (NOT the JpegICC verbose) Outputs debug information to console

Execute the command

process	(source, destination, cb = function(err) {} );

Keywords

nodejs

FAQs

Package last updated on 22 Jan 2014

Did you know?

Socket

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.

Install

Related posts