whatisgithub

What is rastermill?

openclaw/rastermill — explained in plain English

Analysis updated 2026-05-18

27TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

Rastermill is a Node.js library for server-side image processing, offering probing, transparency detection, and encoding with automatic fallback to native image tools.

Mindmap

mindmap
  root((Rastermill))
    What it does
      Image probing
      Transparency checks
      Encoding
      Metadata stripping
    Tech stack
      Node.js
      Photon
      ImageMagick
      ffmpeg
    Use cases
      Automated image pipelines
      AI agent workflows
    Audience
      Backend developers
      AI agent builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Read an image's format, dimensions, and file size without decoding the entire file.

USE CASE 2

Resize, convert, and strip metadata from images inside an automated backend pipeline.

USE CASE 3

Detect whether an image has real transparent pixels versus just an alpha channel.

USE CASE 4

Encode images to fit within a target file size budget for storage or bandwidth limits.

What is it built with?

Node.jsTypeScriptPhotonImageMagickffmpeg

How does it compare?

openclaw/rastermill5bv57zcm44-max/noxus-ai-open-whatsappadrianhajdin/react-native-lingua
Stars272727
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/54/53/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Some formats and quality options require external tools like ImageMagick, GraphicsMagick, ffmpeg, or sips installed on the machine.

The README does not state a license, so usage rights are unclear.

So what is it?

Rastermill is a Node.js library for processing images on the server side. It is aimed at developers building automated systems or AI agents that need to handle images as part of their workflow, rather than at end users working interactively. The library provides three core operations. The probe method reads basic information from an image, such as its format, dimensions, and file size, without decoding the entire file. The transparency method checks whether an image has an alpha channel and whether any pixels are actually transparent, which are two different things. The encode method does the main work: it can resize an image, convert it to a different format, strip metadata, and search for a file size within a specified byte budget. Rastermill uses a library called Photon to do image work inside the running process without spawning external programs. For formats that Photon cannot handle, it can fall back to native tools already installed on the machine, such as ImageMagick, GraphicsMagick, ffmpeg, or the macOS-native sips command. You can also force it to use only the internal approach, or only external tools. WebP quality control, for example, requires an external backend because the internal Photon encoder does not support quality settings. The library sets configurable limits on the pixel count of both input and output images, and refuses to process images that exceed those limits or have unknown dimensions. Metadata like location data and camera settings is stripped by default during any transform, because the internal processing library does not have APIs to carry that data through. The README is short and focused on API reference. There is no description of pricing, licensing terms, or installation steps beyond the import example.

Copy-paste prompts

Prompt 1
How do I use Rastermill's encode method to resize an image and fit it under a target file size?
Prompt 2
Explain how Rastermill falls back to ImageMagick or ffmpeg when Photon cannot handle a format.
Prompt 3
Write code using Rastermill to check whether an uploaded image has real transparent pixels.
Prompt 4
How do I set pixel count limits on input and output images in Rastermill?

Frequently asked questions

What is rastermill?

Rastermill is a Node.js library for server-side image processing, offering probing, transparency detection, and encoding with automatic fallback to native image tools.

What language is rastermill written in?

Mainly TypeScript. The stack also includes Node.js, TypeScript, Photon.

What license does rastermill use?

The README does not state a license, so usage rights are unclear.

How hard is rastermill to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is rastermill for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.