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.
npx claudepluginhub sean-sunagaku/claude-code-plugin --plugin svg-to-pngThis skill uses the workspace's default tool permissions.
Convert SVG to high-quality PNG using sharp with automatic density calculation.
Converts PNG images to high-quality SVGs: removes white backgrounds with ImageMagick alpha thresholding, vectorizes using vtracer spline curves, compresses with SVGO. Ideal for creating clean vectors from raster graphics.
Generates square PNG icons with transparent backgrounds for app icons, favicons, and UI using Google Gemini. Supports flat/3D/line/glyph/gradient/minimal styles, sizes 128-1024px, batch sets, reference matching.
Converts PNG/JPG to SVG using vtracer, removes watermarks, resizes, crops, and edits raster images with ImageMagick CLI commands. Useful for preparing images in docs, diagrams, or code assets.
Share bugs, ideas, or general feedback.
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.