A full-stack web application that converts PNG images to scalable vector graphics (SVG) format.
This project provides a user-friendly web interface to convert PNG images to SVG format. The application uses Potrace for tracing bitmap images and converting them to vector graphics.
- Simple and intuitive user interface
- Drag and drop file upload
- Instant PNG to SVG conversion
- Preview of converted SVG
- Option to view and copy SVG code
- Responsive design that works on desktop and mobile devices
- Angular 19
- Angular Material
- ngx-file-drop for drag-and-drop functionality
- TypeScript
- SCSS for styling
- Node.js
- Express.js
- Multer for file uploads
- Potrace for PNG to SVG conversion
- Sharp and Jimp for image processing
.
├── frontend/ # Angular frontend application
│ ├── src/ # Source files
│ │ ├── app/ # Application components
│ │ │ ├── features/ # Feature modules
│ │ │ │ └── file-upload/ # File upload component
│ │ │ ├── app.component.* # Main app component
│ │ │ └── app.config.* # Angular configuration
│ │ ├── index.html # Main HTML file
│ │ └── main.ts # Entry point
│ ├── package.json # Frontend dependencies
│ └── angular.json # Angular configuration
├── backend/ # Node.js/Express backend
│ ├── server.js # Express server implementation
│ ├── uploads/ # Directory for uploaded files
│ └── package.json # Backend dependencies
└── .gitignore # Git ignore file
- Node.js (v18 or later)
- npm or yarn package manager
-
Clone the repository:
git clone https://github.com/yourusername/PNGtoSVG.git cd PNGtoSVG -
Set up the backend:
cd backend npm install -
Set up the frontend:
cd ../frontend npm install
-
Start the backend server:
cd backend node server.jsThe server will run on http://localhost:3000
-
In a separate terminal, start the frontend development server:
cd frontend npm startThe Angular application will run on http://localhost:4200
-
Open your browser and navigate to http://localhost:4200
- User uploads a PNG image through the web interface
- The image is sent to the backend server
- The server uses Potrace to trace the bitmap and convert it to SVG
- The resulting SVG is sent back to the frontend
- The frontend displays the SVG and provides options to view/copy the SVG code
This project is licensed under the MIT License - see the LICENSE file for details.