À propos du projet
truss is an image transformation tool built around a shared Rust core, offering three primary interfaces: a command-line interface (CLI), an HTTP server, and a WebAssembly (WASM) build for browsers. It supports formats including JPEG, PNG, WebP, AVIF, BMP, TIFF, and SVG, with GIF available as a decode-only input. The tool is designed for local file processing, server-side image handling, and client-side browser applications.
Key capabilities include format conversion with quality control, resizing with multiple fit modes (contain, cover, fill, inside), cropping, rotation, blurring, sharpening, watermarking, and grayscale conversion. The CLI supports shell pipelines via stdin/stdout and can fetch images from remote URLs. The HTTP server can be deployed behind a CDN or reverse proxy, supporting bearer token authentication, signed public URLs, and optional cloud storage backends (S3, GCS, Azure). Security features include built-in SSRF protections and SVG sanitization to remove scripts and external references.
For browser integration, truss provides an npm package (@nao1215/truss-wasm) that runs entirely client-side, enabling local image processing without server uploads. A separate TypeScript package (@nao1215/truss-url-signer) allows Node.js applications to generate signed public URLs. The project is cross-platform, supporting Linux, macOS, and Windows, with installation options via Homebrew, Cargo, AUR, Docker, or prebuilt binaries. Metadata handling is configurable, with options to strip, preserve, or selectively retain EXIF and ICC profiles, and automatic EXIF orientation correction is enabled by default.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.