Welcome to PureBlack Vector Studio — a powerful Python-based automation tool that converts pure black raster images (PNG/JPG) into clean vector formats (SVG & EPS) using Potrace.
It automatically removes white backgrounds, preserves only black regions, batch processes multiple files, and even merges grouped images into one final EPS layout.
⚠️ Important: This tool works only with black silhouette or line-art images on white backgrounds.
It will NOT work with colorful photographs, shaded portraits, or multi-colored graphics.
- 🧼 White Background Removal — Keeps only black regions, removes white/near-white automatically.
- 📄 SVG & EPS Conversion — Converts each image into both vector formats using Potrace.
- 🧠 Auto Grouping — Files with the same prefix are automatically grouped and merged into a final EPS grid.
- 🗂️ Organized Outputs
output_svg/→ Individual SVG filesoutput_eps/→ Individual EPS filesoutput_groups/→ Grouped & merged EPS files
- ⚡ Batch Processing — Convert multiple images at once with a single command.
- 🖥️ Cross Platform — Works on Windows, macOS, and Linux (with Potrace installed).
- ✅ Auto CMYK conversion with 300 PPI
- ✅ Fixed 3000×3000 px canvas size for all outputs
- ✅ Auto grouping of multiple files into single CMYK EPS (center aligned)
- ✅ Ghostscript integration for high quality vector output
Before using the tool, make sure you have the following installed:
Download & install from: https://www.python.org/downloads/
Download from: https://code.visualstudio.com/
➡️ After installation:
- Open VS Code
- Install the Python Extension (from Extensions Marketplace)
Download from: https://ghostscript.com/releases/gsdnld.html
- Download from: http://potrace.sourceforge.net/
- Windows: Extract the ZIP and place
potrace.exeintoC:\Windows\OR add it to your System PATH - macOS:
brew install potrace
Ubuntu/Debian:
sudo apt install potrace
✅ Verify installation:
potrace --version
📦 5. Python Libraries
Install required libraries with a single command:
pip install -r requirements.txt
Or use the helper script:
python install_dependencies.py
Required libraries:
Pillow
numpy
(optional) customtkinter — for GUI (not required in this version)
🚀 How to Use
-
🗂️ Place your black-on-white PNG/JPG files inside the input_images/ folder.
-
▶️ Run the backend script:
PureBlack Vector Studio.py
- (Optional) Use custom options:
python backend.py --input my_folder --output results --threshold 120
--input → Input folder (default: input_images)
--output → Root output folder (default: current dir)
--threshold → Black detection threshold (0–255). Lower = stricter black filtering.
📤 Output Structure
After processing, you'll find your results in these folders:
📁 output_svg/ → Individual SVG files 📁 output_eps/ → Individual EPS files 📁 output_groups/ → Grouped EPS files (merged grid layouts) 📁 temp_bw/ → Temporary PBM files (auto-cleanable)
👉 Grouping is done automatically by using the filename prefix. For example:
logo_1.png logo_2.png logo_3.png
will be merged into:
output_groups/logo_3_images_final.eps
❌ Does not support colored photos or shaded portraits — it's made for pure black silhouette/vector source images only.
🧠 Potrace is required for SVG/EPS conversion. Without it, PBM files will be generated but no vectorization will occur.
📏 Large images are supported, but high RAM is recommended.
🧪 Example Workflow
- You have these files in input_images/:
bird_1.png bird_2.png logo_1.jpg logo_2.jpg
- Run:
python backend.py
- You get:
output_svg/
├─ bird_1.svg
├─ bird_2.svg
├─ logo_1.svg
└─ logo_2.svg
output_eps/
├─ bird_1.eps
├─ bird_2.eps
├─ logo_1.eps
└─ logo_2.eps
output_groups/
├─ bird_2_images_final.eps
└─ logo_2_images_final.eps
✅ Done! All black shapes are cleanly converted to vector format.
🧑💻 Developer
Built with ❤️ using Python + Potrace
Author: Qaisar Rafique
🌟 Support & Feedback
If you find this tool helpful, consider:
⭐ Starring the repository on GitHub
🐛 Reporting bugs or issues in the Issues tab
💡 Suggesting new features through Pull Requests
📜 License
This project is licensed under the MIT License — free to use and modify.