A Visual Studio Code extension that makes it easy to convert SVG files to PNG format. Perfect for developers and designers who need to quickly convert vector graphics to raster format.
Features
🎯 Simple Conversion
Convert SVG files to PNG with just a right-click
Batch convert all SVG files in a folder
Preview option before conversion
🎨 Customization Options
Specify output dimensions
Adjust PNG quality (0.1 to 1.0)
Set default output location
⚡ Fast and Efficient
Built with high-performance Sharp library
Minimal memory usage
Batch processing support
Installation
Open VS Code
Press Ctrl+P (Cmd+P on macOS)
Type ext install fumifumi0831.svg-to-png-converter
Press Enter
Usage
Single File Conversion
Right-click on an SVG file in the Explorer
Select "Convert SVG to PNG"
Choose output folder (if no default set)
Optionally specify dimensions
PNG file will be created in the selected location
Batch Conversion
Right-click on a folder containing SVG files
Select "Convert SVG to PNG"
Choose output folder
All SVG files will be converted while maintaining the original file names
From Command Palette
Press Ctrl+Shift+P (Cmd+Shift+P on macOS)
Type "Convert SVG to PNG"
Press Enter
Select the SVG file to convert
Extension Settings
svgToPngConverter.quality: Quality of the PNG output (0.1 to 1.0)
Default: 1.0
Higher values mean better quality but larger file size
svgToPngConverter.defaultOutputPath: Default output path for converted PNG files
Can be absolute or relative to workspace
Leave empty to choose location each time
Requirements
Visual Studio Code 1.60.0 or higher
No additional software required - all dependencies are included
Troubleshooting
Module not found error
If you encounter a "Cannot find module 'sharp'" error:
Uninstall the extension
Restart VS Code
Install the extension again
If the problem persists:
cd ~/.vscode/extensions/fumifumi0831.svg-to-png-converter-*
npm install sharp --save
Then restart VS Code.
Platform-specific issues
Ensure Node.js 14.0.0 or higher is installed
Check write permissions in the extension directory
Windows users need Visual C++ runtime installed
Known Issues
Large SVG files may take longer to process
Some complex SVG filters might not render exactly as in vector format
Files with external references may not convert correctly
Release Notes
1.0.0 (2024-03-18)
Initial stable release
Fast conversion engine
Batch processing support
Preview functionality
Customizable settings
Feedback
Found a bug or have a feature request? Please open an issue on our GitHub repository.