Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.88 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.88 KB

SVG to Image Converter

This project is a simple web-based tool that converts SVG code or files into PNG images. It also allows you to download the SVG code as a file. The tool is built using HTML, CSS, and JavaScript, and it provides an easy-to-use interface for users to convert and download images.

preview

Features

  • Convert SVG Code to PNG: Paste your SVG code into the input field and download it as a PNG image.
  • Upload SVG File: Upload an SVG file from your computer and convert it to a PNG image.
  • Download SVG: Option to download the displayed SVG code as an SVG file.
  • Custom Dimensions: Specify custom width and height for the PNG output.
  • Real-time Preview: Automatically displays the SVG image as you enter the code or upload a file.

Installation

To use this tool, simply clone the repository and open the index.html file in your web browser:

git clone https://github.com/yourusername/svg-to-png-converter.git
cd svg-to-png-converter
open index.html

Alternatively, you can view the live demo here.

Usage

  1. Enter SVG Code:

    • Manually enter SVG code into the "SVG Code" text area.
    • Alternatively, upload an SVG file using the "Upload SVG File" button.
  2. Set Image Name:

    • Provide a name for the image to be downloaded.
  3. Set Image Dimensions:

    • Set the desired width and height for the PNG image.
  4. Download:

    • Click "Download PNG" to download the image as a PNG file.
    • Click "Download SVG" to download the SVG code as an SVG file.

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to create an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.