resvg

Convert static SVGs to raster PNGs using usvg and resvg.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill resvg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resvg
Source: https://github.com/yankeeinlondon/rusty-biscuit/tree/main/.claude/skills/resvg
Command: npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill resvg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rendering static SVGs to raster formats reliably across platforms requires a deterministic, memory-safe pipeline. This Skill provides a Rust-based approach using usvg for parsing and resvg for rendering, ensuring pixel-perfect output and cross-platform consistency.

Core Features & Use Cases

  • Two-stage pipeline: parse SVG with usvg → render with resvg → output with tiny-skia for pixel-perfect results.
  • Text-to-path rendering and explicit font loading for portability.
  • Cache parsed trees and provide cross-platform consistency and memory safety.
  • Practical scenarios include server-side rendering, icon generation, and GUI asset pipelines.

Quick Start

Parse an SVG file, render it with resvg, and save the result as a PNG.

Frequently Asked Questions about resvg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render SVGs to PNGs on the server side using Rust?

Rendering SVGs to PNGs deterministically involves a two-stage pipeline: parsing the SVG with usvg, then rendering with resvg to ensure pixel-perfect output and cross-platform consistency.

What is the best way to ensure deterministic SVG rendering across different platforms?

Deterministic SVG rendering is achieved by using a Rust-based parse-then-render pipeline with usvg and resvg, which guarantees memory safety and cross-platform consistency for static SVG files.

Does server-side SVG rendering in Rust require explicit font loading?

Yes, server-side SVG rendering requires explicit font loading via fontdb to enable text-to-path rendering, ensuring portability and consistent text visualization across different environments.

Can I cache parsed SVG trees to improve rendering performance in Rust?

Yes, you can cache parsed SVG trees after the initial usvg parsing stage, which optimizes the pipeline for repeated rendering tasks like icon generation or thumbnail creation.

What are the limitations of using resvg for static SVG to PNG conversion?

resvg is limited to static SVGs and cannot render dynamic or animated SVG content; it focuses entirely on producing deterministic raster PNGs from static vector graphics for Rust applications.