Skip to main content

Image Tools

@dougschaefer/image-toolsv2026.04.27.1· 3d agoMODELS
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

Add curated README and LICENSE to tarball (additionalFiles), bringing extension's Swamp Club quality grade from F/B to A-/B.

03Models1
@dougschaefer/image-toolsv2026.04.02.1image_tools/image_tools.ts
fn info(path: string)
Get image metadata: dimensions, format, color space, and file size.
ArgumentTypeDescription
pathstringAbsolute 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.
ArgumentTypeDescription
inputPathstringAbsolute path to the source image
outputPathstringAbsolute path for the output image
fn resize(inputPath: string, outputPath: string)
Resize an image by dimensions or percentage. Preserves aspect ratio by default.
ArgumentTypeDescription
inputPathstringAbsolute path to the source image
outputPathstringAbsolute 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.
ArgumentTypeDescription
inputPathstringAbsolute 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.
ArgumentTypeDescription
inputPathstringAbsolute 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.
ArgumentTypeDescription
outputPathstringAbsolute 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.
ArgumentTypeDescription
basePathstringAbsolute path to the base image
overlayPathstringAbsolute path to the overlay image
outputPathstringAbsolute path for the output image

Resources

image(infinite)— Processed image artifact
04Previous Versions2
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
2
Archive size
6.5 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
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels