Rastermill is a fast, portable image processing library for Node.js agents, currently at version 0.3.1. It uses Photon for in-process image operations and can fall back to native tools (sips, ImageMagick, GraphicsMagick, ffmpeg) for formats like HEIC/AVIF. Key differentiators: configurable pixel limits for safety, automatic format detection and metadata stripping, and support for auto-orientation. Types are shipped. Requires Node >= 22. Release cadence is not specified.
npm install rastermillNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a Rastermill instance, probe an image, and encode it as JPEG with resize and quality.
Upgrade to Node 22 or later.
Use metadata: 'preserve' only when no transform is applied; otherwise metadata is stripped.
Set execution: 'auto' or 'external' to use native tools for WebP.
Use import syntax or dynamic import.
Check response.bytes > 0 or catch probe/encode errors.
Change require('rastermill') to import { createRastermill } from 'rastermill', or use dynamic import.Check the input buffer or file; supported formats: HEIC, JPEG, PNG, WebP, AVIF, etc. Ensure external tools are installed if needed.
No dependency data recorded yet.