Skip to main content

@dougschaefer/image-tools

v2026.04.27.1

Image manipulation via ImageMagick and potrace — recolor, resize, format conversion, vector tracing, SVG rasterization, and compositing. Requires ImageMagick and potrace installed locally.

Repository

https://github.com/dougschaefer6/swamp-image-tools

Labels

imageimagemagickpotracesvgvectorgraphics

Contents

Quality score

How well-documented and verifiable this extension is.

100%

Grade A

  • 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

Install

$ swamp extension pull @dougschaefer/image-tools

Release Notes

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

@dougschaefer/image-toolsv2026.04.02.1image_tools/image_tools.ts
infoGet image metadata: dimensions, format, color space, and file size.
ArgumentTypeDescription
pathstringAbsolute path to the image file
recolorReplace 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
resizeResize an image by dimensions or percentage. Preserves aspect ratio by default.
ArgumentTypeDescription
inputPathstringAbsolute path to the source image
outputPathstringAbsolute path for the output image
convertConvert an image between formats (PNG, JPEG, WebP, TIFF, BMP, GIF). Quality is configurable for lossy formats.
ArgumentTypeDescription
inputPathstringAbsolute path to the source image
traceTrace 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
renderRasterize an SVG or EPS to a high-resolution PNG. Control output size via DPI or target width.
ArgumentTypeDescription
outputPathstringAbsolute path for the PNG output
compositeOverlay 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