rusticker drkbugs
winget install --id=drkbugs.rusticker -e rusticker is a high-precision CLI layout tool for generating sticker sheets. It prints transparent raster images with custom contour outlines for easy die-cutting.
winget install --id=drkbugs.rusticker -e rusticker is a high-precision CLI layout tool for generating sticker sheets. It prints transparent raster images with custom contour outlines for easy die-cutting.
rusticker is a command-line tool written in Rust for generating A4 grid layouts of stickers in PDF format, offering precise control over grid dimensions, DPI, and spacing. It allows you to create PDF documents with two layers: a raster layer with the image to be printed, and a vector layer with the outline for die-cutting.
mask outline around the foreground.stickerize): Erase image background using an AI model (U2-Netp by default) to create transparent PNG stickers.--force flag.Ensure you have Rust and Cargo installed, then clone the repository and run:
cargo build --release
The compiled binaries will be located at:
target/release/rusticker: Main tool containing the layout commands (bake, compose, batch-compose).target/release/stickerize: Background removal neural network tool.For convenience, cross-platform packaging scripts are provided to build and bundle the executables:
packager/macos/target/rusticker-1.1.6.pkg.--native flag to compile only for your host's native architecture (Apple Silicon or Intel) instead of a universal binary.cargo-xwin and generate the ZIP archive: packager/windows/target/rusticker-v1.1.6-windows-x64.zip.Windows users can install rusticker and stickerize using the WinGet package manager:
winget install drkbugs.rusticker
If you are developing or want to test the manifests locally before submitting to the WinGet community repository, run:
# Validate the manifest files structure and contents
winget validate packager/windows/winget/1.1.6
# Test the installation locally using the manifests
winget install --manifest packager/windows/winget/1.1.6
The project is split into two standalone executables.
rustickerrusticker provides commands to generate sticker grid layouts in PDF format.
rusticker [GLOBAL_OPTIONS]
--dpi : Resolution of the application in DPI (dots per inch). Allowed values: 100, 200, 300, 600 [default: 300].--margin : Page margin on the A4 page in millimeters [default: 5.0].--force: Required to overwrite the output PDF file if it already exists.--unsafe: Disable some guardrails (like vertices and loops limits for the mask figure type).-v, --verbose: Show verbose logs on stdout describing layout calculations, cropping dimensions, grid slots, and mask statistics.-h, --help: Prints help information.-V, --version: Prints version information.bakeGenerates blank shapes (square, circle, or rectangle outlines) in an A4 grid.
rusticker bake [OPTIONS] --figure [--diameter | --side | --width --height ]
--figure : Type of figure to bake (square, circle, or rectangle - mask is not supported for baking).--diameter : Diameter of the circle in pixels (required for circle).--side : Side length of the square in pixels (required for square).--width : Width of the rectangle in pixels (required for rectangle).--height : Height of the rectangle in pixels (required for rectangle).--min-space : Minimum spacing in millimeters between adjacent figures [default: 2.0].--stroke-thickness : Stroke thickness of the figure outline in millimeters (e.g. 2.25) [default: 0.25].-o, --output : Output PDF file path [default: baked.pdf].composeGenerates grid shapes populated with a center-cropped repeat of an input image.
rusticker compose [OPTIONS] --figure --input
--figure : Type of figure (square, circle, rectangle, or mask). The mask option dynamically detects background pixels (matching the color at (0, 0)) and traces a custom outline around the foreground sticker.--input : Path to the input image file (PNG or JPEG).--diameter : (Optional) Diameter of the circle in pixels.--side : (Optional) Side length of the square in pixels.--width : (Optional) Width of the rectangle in pixels.--height : (Optional) Height of the rectangle in pixels.--size : (Optional) Size of the mask figure in pixels. If not provided, no cropping is performed and the largest dimension of the input image is used as the base size.--min-space : Minimum spacing in millimeters between adjacent figures [default: 2.0].--stroke-thickness : Stroke thickness of the outline in millimeters [default: 0.25].--algorithm : Algorithm to use for mask generation (basic, advanced, or curves). Only used when --figure mask is selected [default: advanced]:
basic: Traces exact pixel-stepped straight lines around the mask boundary.advanced: Simplifies the outline using the Ramer-Douglas-Peucker (RDP) algorithm to drastically reduce vector segments.curves: Converts the RDP simplified outline into smooth cubic Bézier curves (quadratic B-splines) for optimal vinyl plotter cutting.--rdp-level : Aggressiveness of RDP segment reduction. Accepts a value from 1 (least reduction, more segments) to 5 (most reduction, fewest segments) [default: 3].--resize-outline : Resize factor for the contour outline (greater than 0.5 and less than 1.5). Only applied when --figure mask is selected [default: 1.0].-o, --output : Output PDF file path [default: composed.pdf].batch-composeComposes stickers from multiple input images, quantities, and customized settings specified in a CSV file, laying them out dynamically across A4 pages.
rusticker batch-compose [OPTIONS] --input
--input : Path to the input CSV configuration file.-o, --output : Output PDF file path [default: batch_composed.pdf].The CSV configuration file contains one entry per line, using the format:
, ,
compose subcommand (e.g. --figure , size options like --diameter, --side, --width/--height, or outline settings like --stroke-thickness or --algorithm).Example CSV content (stickers.csv):
"C:\path with space\future.png", 4, --figure mask
C:\stickers\button.png, 6, --figure circle --diameter 200
C:\stickers\dice.png, 3, --figure square --side 230 --stroke-thickness 0.5
rusticker validates the CSV first. If any image file is missing, any quantity is invalid, or any command line argument fails parsing, the command aborts immediately before generating any output.stickerizestickerize is a standalone tool that erases the background of an input image (PNG, JPEG, or WEBP) using a neural network model, saving the transparent output as a PNG.
stickerize [OPTIONS] --input --output
--input : Path to the input image file (PNG, JPEG, or WEBP).-o, --output : Output transparent PNG file path.--model : The neural network model to use for background removal (u2netp, rmbg, or birefnet) [default: birefnet].
birefnet: General-purpose BiRefNet model (~224 MB) [default]. If not locally cached, it downloads automatically from GitHub Releases to ~/.rusticker/models/birefnet.onnx.u2netp: A lightweight, fast pre-trained model (~4.7 MB). If not locally cached, it downloads automatically from GitHub Releases to ~/.rusticker/models/u2netp.onnx.rmbg: Bria AI's high-quality background removal model (~176 MB). If not locally cached, it downloads automatically from Hugging Face to ~/.rusticker/models/rmbg.onnx.--cuda: Use CUDA GPU acceleration for inference if specified (CPU execution is used by default).-q, --quiet: Do not output any logs or progress indicators to stdout (errors will still be printed).-V, --version: Prints version information, the background removal tool build legend (Background removal tool build with Rust by drkbugs), and supported models along with their download URLs.--border : (Optional) Border thickness in pixels to add around the foreground object after background removal.--border-color : Border color in hexadecimal format (e.g. #22AA5E or 22AA5E, case-insensitive) [default: #FFFFFF].--antialiasing : Enable or disable antialiasing for the outer part of the border outline [default: true].--format : Output image format to save background-removed stickers [default: png]. The ws-webp format resizes the image to fit into a transparent 512x512 pixels square, preserving the aspect ratio and padding the margins with transparency.--quality : Output image quality, accepting an integer between 1 (lowest quality/compression) and 100 (highest quality/compression) [default: 80]. It configures the PNG DEFLATE compression level proportionally or specifies the WebP lossy encoding quality.When using --figure mask, the tool automatically detects background pixels (matching the color at (0, 0)) and traces a custom outline around the foreground sticker. You can choose from three different algorithms to trace the outline:
basic: Traces exact pixel-stepped straight lines around the mask boundary.advanced (Default): Simplifies the outline using the Ramer-Douglas-Peucker (RDP) algorithm to drastically reduce vector segments.curves: Smooths the contour by converting the RDP-simplified outline into smooth cubic Bézier curves (quadratic B-splines) for optimal vinyl plotter cutting.--rdp-level)Controls the aggressiveness of the RDP segment reduction. It accepts a value from 1 to 5 [default: 3]:
1: Low optimization (more segments left, $\epsilon = 0.5$).2: Moderate-low optimization ($\epsilon = 1.0$).3: Medium optimization ($\epsilon = 1.5$).4: High optimization ($\epsilon = 2.0$).5: Maximum optimization (fewest segments, $\epsilon = 3.0$).To prevent hangs or extremely large output files on complex or noisy images, rusticker enforces complexity limits on mask generation. If an image generates:
basic: 500 loopsadvanced: 1,500 loopscurves: 3,000 loopsbasic: 1,000,000 verticesadvanced: 2,000,000 verticescurves: 4,000,000 verticesThe tool will abort with an error message detailing the complexity. For noisy images, clean up the background to a solid color before processing.
> [!NOTE]
> You can bypass these complexity limits entirely by using the global option --unsafe (e.g. rusticker --unsafe compose --figure mask ...).
cargo run -- bake --figure square --side 150 --stroke-thickness 1.5 -o grid_squares.pdf
cargo run -- bake --figure rectangle --width 150 --height 100 --stroke-thickness 1.5 -o grid_rects.pdf
cargo run -- --force compose --figure circle --input my_sticker.png --diameter 120 --stroke-thickness 2.0 -o output_composed.pdf
cargo run -- compose --figure rectangle --input my_sticker.png --width 150 --height 100 --stroke-thickness 1.5 -o grid_rects_composed.pdf
cargo run -- compose --figure mask --algorithm curves --rdp-level 4 --input my_sticker.png -o smooth_curves.pdf
cargo run -- batch-compose --input stickers.csv -o mixed_stickers.pdf
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_transparent.png
cargo run --bin stickerize -- --model rmbg --input my_sticker.jpg -o my_sticker_transparent.png
cargo run --bin stickerize -- --model birefnet --input my_sticker.jpg -o my_sticker_transparent.png
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_transparent.png --border 10 --border-color "#22AA5E"
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_transparent.png --border 10 --border-color "#22AA5E"
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_transparent.png --border 10 --border-color "#22AA5E" --antialiasing false
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_transparent.webp --format webp
cargo run --bin stickerize -- --input my_sticker.jpg -o my_sticker_512.webp --format ws-webp