Image Tools
@dougschaefer/image-toolsv2026.05.27.1
01README
Image manipulation via ImageMagick and potrace — recolor, resize, format conversion, vector tracing, SVG rasterization, and compositing. Requires ImageMagick and potrace installed locally.
02Release Notes
Modernization: idempotency, live pre-flight checks, sensitive-field marking, resource-write fixes per audit. No breaking API changes.
03Models
@dougschaefer/image-toolsv2026.05.27.1image_tools/image_tools.ts
fn info(path: string)
Get image metadata: dimensions, format, color space, and file size.
| Argument | Type | Description |
|---|---|---|
| path | string | Absolute path to the image file |
fn recolor(inputPath: string, outputPath: string)
Replace one color with another in an image. Uses fuzz tolerance for anti-aliased edges.
| Argument | Type | Description |
|---|---|---|
| inputPath | string | Absolute path to the source image |
| outputPath | string | Absolute path for the output image |
fn resize(inputPath: string, outputPath: string)
Resize an image by dimensions or percentage. Preserves aspect ratio by default.
| Argument | Type | Description |
|---|---|---|
| inputPath | string | Absolute path to the source image |
| outputPath | string | Absolute path for the output image |
fn convert(inputPath: string)
Convert an image between formats (PNG, JPEG, WebP, TIFF, BMP, GIF). Quality is configurable for lossy formats.
| Argument | Type | Description |
|---|---|---|
| inputPath | string | Absolute path to the source image |
fn trace(inputPath: string)
Trace a bitmap image to SVG vector using potrace. Best for logos, icons, and flat-color artwork. Optionally recolor the output.
| Argument | Type | Description |
|---|---|---|
| inputPath | string | Absolute path to the source image |
fn render(outputPath: string)
Rasterize an SVG or EPS to a high-resolution PNG. Control output size via DPI or target width.
| Argument | Type | Description |
|---|---|---|
| outputPath | string | Absolute path for the PNG output |
fn composite(basePath: string, overlayPath: string, outputPath: string)
Overlay one image on top of another at a specified position. Useful for watermarks, logos on backgrounds, etc.
| Argument | Type | Description |
|---|---|---|
| basePath | string | Absolute path to the base image |
| overlayPath | string | Absolute path to the overlay image |
| outputPath | string | Absolute path for the output image |
Resources
image(infinite)— Processed image artifact
04Previous Versions
2026.05.26.1May 26, 2026
Align model version fields with manifest (2026.05.26.1); republish under swamp 20260526 conventions
2026.05.13.1May 13, 2026
Add JSDoc to model entrypoints to satisfy rubric v2 symbols-docs factor
2026.04.27.1Apr 27, 2026
Add curated README and LICENSE to tarball (additionalFiles), bringing extension's Swamp Club quality grade from F/B to A-/B.
2026.04.13.1Apr 13, 2026
Pin zod to 4.3.6 for consistency
2026.04.02.1Apr 2, 2026
Initial release: recolor, resize, convert, trace, render, composite, info methods
05Stats
A
100 / 100
Downloads
5
Archive size
8.9 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
06Platforms
07Labels