{"id":50271242,"url":"https://github.com/openclaw/rastermill","last_synced_at":"2026-05-31T22:00:43.783Z","repository":{"id":360254968,"uuid":"1249290620","full_name":"openclaw/rastermill","owner":"openclaw","description":"Fast, portable image processing for Node agents.","archived":false,"fork":false,"pushed_at":"2026-05-30T14:59:22.000Z","size":581,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-30T21:16:25.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rastermill.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openclaw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["moltbot"]}},"created_at":"2026-05-25T14:46:29.000Z","updated_at":"2026-05-30T17:01:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/openclaw/rastermill","commit_stats":null,"previous_names":["openclaw/prism","openclaw/rastermill"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/openclaw/rastermill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclaw%2Frastermill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclaw%2Frastermill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclaw%2Frastermill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclaw%2Frastermill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openclaw","download_url":"https://codeload.github.com/openclaw/rastermill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclaw%2Frastermill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33750474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-27T18:00:26.359Z","updated_at":"2026-05-31T22:00:43.736Z","avatar_url":"https://github.com/openclaw.png","language":"TypeScript","funding_links":["https://github.com/sponsors/moltbot"],"categories":[],"sub_categories":[],"readme":"# Rastermill\n\nFast, portable image processing for Node agents.\n\nRastermill provides a small image-processing API for server-side Node code. It uses\nPhoton for fast in-process image work and can fall back to native tools such as\n`sips`, ImageMagick, GraphicsMagick, or ffmpeg for formats that need external\ncodec support.\n\nDocs: \u003chttps://rastermill.com/\u003e\n\n```ts\nimport { createRastermill } from \"rastermill\";\n\nconst rastermill = createRastermill({\n  execution: \"auto\",\n  limits: {\n    inputPixels: 25_000_000,\n    outputPixels: 25_000_000,\n  },\n});\n\nconst info = await rastermill.probe(imageBuffer);\nconst jpeg = await rastermill.encode(imageBuffer, {\n  format: \"jpeg\",\n  resize: { maxSide: 1600 },\n  quality: 85,\n});\n// =\u003e { data, format: \"jpeg\", mimeType: \"image/jpeg\", width, height, bytes, metadata: \"stripped\", resized, chosen }\n```\n\n## API\n\n```ts\nconst rastermill = createRastermill(options);\n```\n\nThe API is three methods:\n\n- `probe(input)` — read `format`, `width`, `height`, `bytes`, `hasAlpha`, and `orientation` from the header, without a full decode.\n- `transparency(input)` — decode common raster formats and report `hasAlphaChannel` separately from `hasTransparentPixels`.\n- `encode(input, options?)` — resize, re-encode to an exact format, auto-select opaque vs transparent output, fit dimension limits, and/or search a byte budget.\n\nThe same methods are also exported as standalone functions backed by a lazy\ndefault-configured instance:\n\n```ts\nimport { probe, transparency, encode } from \"rastermill\";\n```\n\nA straight format conversion (e.g. HEIC/AVIF → JPEG) is just `encode(input, { format: \"jpeg\" })` with no `resize`. JPEG EXIF orientation is baked in by default; HEIC orientation handling depends on the native backend. Pass `autoOrient: false` to skip explicit orientation work.\n\nEncoded outputs strip metadata by default. `metadata: \"preserve\"` only preserves\nmetadata when Rastermill can return the original bytes unchanged; Photon does not\nexpose EXIF/GPS/ICC/XMP read, write, or copy APIs, so any real transform strips\nmetadata and reports `metadata: \"stripped\"`.\n\n## Backends\n\n`execution: \"auto\"` uses Photon in-process for supported formats, then native\ntools when a format needs external codec support. Use `execution: \"internal\"`\nto forbid child processes, or `execution: \"external\"` to use only native tools.\nWebP quality control requires an external backend because Photon's WebP encoder\ndoes not accept a quality setting.\n\nRastermill refuses to decode images with unknown dimensions, images larger than the\nconfigured input pixel budget, or resize targets larger than the configured\noutput pixel budget.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclaw%2Frastermill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenclaw%2Frastermill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclaw%2Frastermill/lists"}