Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@jimp/plugin-threshold

Latest version: v2.1.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: alisowski, oliver.moran
14,677 Stars
786 Forks
3 Versions
16.8M Downloads
TypeScript Repo language

Scan summary

@jimp/plugin-threshold was last scanned on 24 Nov 2026 at version 2.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published within 3 days (22–24 Nov 2026).
  • Findings: No rules fired in version 2.1.0.
  • Downloads: 16,848,007 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.1.0 LATEST 24 Nov 2026 No rules fired
2.0.0 24 Nov 2026 No rules fired
1.7.0 22 Nov 2026 No rules fired

No rules fired in 2.1.0

Findings

Findings for v2.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

This is useful as a simplified method for processing scanned drawings, signatures, etc

Usage

threshold greyscales the image (unless autoGreyscale: false), keeps pixels whose value is below max and sets the rest to replace (default 255). With autoGreyscale: false the image keeps its colors and each red, green and blue channel is compared with max and replaced on its own.

import { Jimp } from "jimp";

const image = await Jimp.read("scan.png");

image.threshold({ max: 150 });
Choosing max automatically

Pass max: "otsu" to pick max from the image with Otsu's method, which finds the split between dark and light pixels that best separates the two groups.

image.threshold({ max: "otsu" });

To see or reuse the level it picks, call otsuThreshold. It takes the same autoGreyscale option and returns a number you can pass as max:

import { Jimp, otsuThreshold } from "jimp";

const level = otsuThreshold(image);

image.threshold({ max: level });

How the level is computed:

  • It uses Rec. 709 luminance. With autoGreyscale: false the image should already be grey (like OpenCV, which only runs Otsu on single-channel images), and it reads the red channel.
  • Each pixel counts in proportion to its alpha. Fully transparent pixels are ignored, and a pixel at alpha 128 counts about half as much as an opaque one.
  • The level is one more than the value scikit-image's threshold_otsu and OpenCV's THRESH_OTSU report, because those return the highest dark value while threshold keeps pixels strictly below max.
  • If there aren't two different values to separate (a uniform image, or one with no visible pixels), it returns 255, so threshold keeps every pixel below 255 unchanged.

See Getting Started to read an image, change it and save the result with write or getBuffer.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @jimp/plugin-threshold

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229