From svg-to-png
Convert SVG to PNG with control over dimensions, background, CSS effects like mix-blend-mode/filters. Presets for app icons, favicons, splash screens.
How this skill is triggered — by the user, by Claude, or both
Slash command
/svg-to-png:svg-to-pngThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert SVG to high-quality PNG using sharp with automatic density calculation.
Convert SVG to high-quality PNG using sharp with automatic density calculation.
Ensure sharp is installed in the project (npm install sharp). Install it if missing before running the script.
scripts/convert_svg.mjs — the main conversion script.
node scripts/convert_svg.mjs --input logo.svg --output logo.png --width 1024
node scripts/convert_svg.mjs --input logo.svg --width 512 --height 512 --background "#1a1a2e"
Arguments:
--input / -i (required): Path to input SVG--output / -o: Output PNG path (defaults to <input-name>.png)--width / -w: Target width in pixels--height / -h: Target height in pixels--background / -b: Background color (hex or named). Default: transparentGenerate multiple PNGs from one SVG using built-in presets:
node scripts/convert_svg.mjs --input logo.svg --preset app-icon --output-dir ./icons
node scripts/convert_svg.mjs --input logo.svg --preset splash-portrait --output-dir ./splash
Arguments:
--preset / -p: Preset name (see below)--output-dir / -d: Output directory (created automatically)Available presets: app-icon, splash-portrait, splash-icon, favicon, og-image.
For preset details and sizes, see references/presets.md.
sharp rasterises SVG at a given DPI (density). The script auto-calculates:
density = 72 * target_width / svg_viewbox_width
A 100-wide viewBox rendered at 1024px uses density 737, producing crisp output. No manual tuning needed.
--background を指定しなければ背景は透明。SVG の背景色をそのまま活かせる。通常は背景色指定不要。app-icon プリセットは自動で白背景にフォールバック。<path> outlines in the SVG to avoid font-not-found issues on other machines.var()): Not supported by librsvg. Replace with literal values before conversion.splash-icon preset for the single image referenced by splash.image in app config.npx claudepluginhub sean-sunagaku/claude-code-plugin --plugin svg-to-pngConverts PNG images to high-quality SVG using ImageMagick, vtracer spline vectorization, and svgo compression. Supports optional white-background removal and parameter tuning for cleaner vectors.
Wraps raster logo files (webp, png, jpg) as base64-embedded SVG for pixel-identical output. Use when converting logos to SVG format without a vector source.
Creates, edits, reviews, and validates high-quality SVG graphics with W3C compliance, CSS independence, accessibility, and safety.