Skip to content
deekshithvodelaPublic

About

High-precision 100% private in-browser image to scalable vector & SVG converter studio with 0% Generative AI.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

8 Commits

Folders and files

Repository files navigation

C2Vector Studio

Deterministic In-Browser Vectorization & Scalable Vector Graphics Synthesis Engine

License: MIT Generative AI Privacy Accessibility PWA W3C SVG

Launch C2Vector Studio β€’ Algorithm Workflow β€’ About & FAQ


C2Vector Studio Hero Banner


🌟 Executive Summary

C2Vector is a high-precision, client-side vector synthesis application and Progressive Web App (PWA). It converts raster images (PNG, JPEG, WebP, AVIF), logos, camera photographs, and monograms into mathematically rigorous, infinitely scalable W3C SVG 1.1 vectors and master print-ready vector PDF suitesβ€”executing 100% inside your browser's native Web Workers.

Why C2Vector?

Most online vectorizers suffer from one of three fatal flaws:

  1. Predatory Cloud Paywalls: Forcing subscriptions or holding your high-resolution exports hostage.
  2. Cloud Privacy Leaks: Uploading private company logos, sensitive intellectual property, or personal photos to opaque remote servers.
  3. Generative AI Hallucinations: Wrapping uncalibrated diffusion or machine-learning models that distort straight lines into wavy noodles, smudge sharp corners, and invent phantom contours.

C2Vector guarantees 0% Generative AI and 100% Mathematical Determinism. Every vector curve, color plate, and boundary is calculated using peer-reviewed computer vision algorithms running entirely in local device memory.


✨ Key Features & Capabilities

1. πŸ›‘οΈ 100% Client-Side Privacy & Zero Cloud Telemetry

  • All processing occurs in dedicated browser Web Workers (worker.js).
  • Images never travel across the network to any server, bucket, or third-party API.
  • All in-memory buffers and ImageData representations are immediately reclaimed when the browser tab is closed.

2. πŸ”² Dedicated Logo & Typography Engine

  • 90-Degree Corner Preservation: Tightened straight-line tolerance (optTolerance: 0.08) and aggressive corner retention (alphaMax: 0.15) ensure crisp right angles on lettering, sharp brackets, and tiny punctuation marks like the dot on an 'i'.
  • Bypass Bilateral Blurring: Skips Gaussian pre-smoothing to prevent softening of crisp corporate vectors.
  • Adaptive Natural Spot Color Discovery: Clusters anti-aliased transition pixels into dominant spot colors with a safety ceiling of up to 32 colors without artificial color clipping.
  • 1-Click Transparent Background Knockout: Instantly isolates logos against pure white or checkerboard transparent backdrops.

3. 🎨 Multi-Tonal Silk Screen, Vinyl & CNC Stencils

Decomposes input graphics into production-ready manufacturing layers:

  • 1-bit Otsu Monochrome Silhouette: Variance minimization for pure high-contrast vinyl cutting.
  • 4-Tone & 8-Tone Tonal Plates: Progressive density plates calibrated via Tone Match Index (TMI).
  • Inverted Plates: Negative print suites optimized for dark apparel printing and laser engraving.
  • Bridge-Connected Cut Stencils: Structural bridges preventing "island fallout" during physical cutting.

4. πŸ“„ Master Scalable Vector PDF Suite

  • In-browser compilation using jsPDF and svg2pdf.js.
  • Exports all active artboards into a single multi-page PDF document (master_vector_suite.pdf).
  • 100% Pure Vector BΓ©zier Streams: Infinite print scalability with strictly 0 raster compression artifacts.

5. πŸ” Interactive 360Β° GPU Pan & Zoom Workbench

  • Stateful 360Β° Pan-Zoom: Smooth hardware-accelerated pan, touch-drag, and wheel zoom from 1x up to 8x magnification with negative space overflow protection.
  • 12 Specialized Artboards: Rapid switching between Faithful Master, Vibrant Print, Chromatic Glaze, Tonal Plates, and 100% Pixel Matrices with strictly 0.00px Layout Shift (CLS).
  • Dynamic Swatch Palette: Real-time hex color swatches with one-click clipboard copying and toast feedback.

6. πŸ“± Progressive Web App (PWA) & Offline Capability

  • Caches all runtime assets via Service Worker (sw.js).
  • Installable as a standalone app on macOS, Windows, Linux, Android, and iOS.
  • Multi-aspect ratio OpenGraph card suite (<100KB) and Google Search Central multiple-of-48px favicons.

πŸ”¬ Mathematical Architecture & Pipeline

graph TD
    A["Raw Input Image (PNG/JPEG/WebP/AVIF)"] --> B["Step 1: Bicubic Resampling & Bilateral Filter"]
    B --> C["Step 2: Tonal Decomposition & Otsu Thresholding"]
    B --> D["Step 3: Sub-Pixel Canny Edge Gradient Filter"]
    B --> E["Step 4: CIELAB Color Space Quantization"]
    C & D & E --> F["Step 5: Potrace Continuous BΓ©zier Spline Fitting"]
    F --> G["Step 6: Translucent Chromatic Glaze (70-80% Opacity)"]
    G --> H["Master Scalable SVG Vectors"]
    G --> I["Master Vector PDF Compilation (Pure BΓ©zier)"]
Loading
  1. Step 1 β€” Resampling & Bilateral Edge-Preserving Smoothing: High-order bicubic Hermite interpolation upscales input images to 4x resolution. A bilateral filter applies Gaussian spatial and photometric domain weighting: $$\text{BF}[I]p = \frac{1}{W_p} \sum{q \in S} G_{\sigma_s}(|p - q|) , G_{\sigma_r}(|I_p - I_q|) , I_q$$
  2. Step 2 β€” Tonal Studies & TMI Calibration: Decomposes lightness into discrete tonal thresholds using Otsu's variance minimization and checks Tone Match Index ($TMI \ge 0.88$) for monotonic luminosity grading.
  3. Step 3 β€” Sub-Pixel Canny Edge Gradients: Calculates horizontal and vertical Sobel gradients ($G_x, G_y$), detects local intensity maxima along gradient directions, and applies hysteresis thresholding ($T_{\text{low}}, T_{\text{high}}$) to generate 1-pixel hairline boundary contours.
  4. Step 4 β€” CIELAB Quantization: Maps RGB pixels into perceptually uniform CIE $L^a^b^$ color space. Computes Delta E differences ($\Delta E_{ab}^$) to group anti-aliased transition pixels into distinct tonal plates without chromatic muddying.
  5. Step 5 β€” Schneider-Ramer-Peucker & Potrace Curve Tracing: Traces boundary polygons, determines optimal knot vectors, and fits continuous cubic BΓ©zier splines maintaining $G^1$ geometric continuity: $$\mathbf{B}(t) = (1-t)^3 \mathbf{P}_0 + 3(1-t)^2 t \mathbf{P}_1 + 3(1-t) t^2 \mathbf{P}_2 + t^3 \mathbf{P}_3, \quad t \in [0, 1]$$
  6. Step 6 β€” Multi-Page Vector PDF Export: Compiles SVG vector streams into PDF drawing commands via Skia/PDF geometry primitives in local client memory.

πŸ“ Repository Structure

c2vector/
β”œβ”€β”€ public/                      # Static unbundled assets copied directly to dist/
β”‚   β”œβ”€β”€ favicon.ico              # Standard root favicon
β”‚   β”œβ”€β”€ manifest.webmanifest     # Progressive Web App manifest
β”‚   β”œβ”€β”€ sw.js                    # Offline Service Worker cache (c2vector-v7)
β”‚   β”œβ”€β”€ robots.txt               # Search crawler directives
β”‚   β”œβ”€β”€ sitemap.xml              # Canonical clean XML sitemap
β”‚   β”œβ”€β”€ .nojekyll                # GitHub Pages static asset bypass
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ icons/               # Favicon suite (48, 96, 192, 512, apple-touch)
β”‚   β”‚   β”œβ”€β”€ og/                  # Multi-aspect OpenGraph cards (<100KB, Golden & B&W)
β”‚   β”‚   β”œβ”€β”€ sample_logo.png      # Built-in demo logo graphic
β”‚   β”‚   └── sample_photo.png     # Built-in demo photography artwork
β”‚   └── vendor/
β”‚       β”œβ”€β”€ jspdf.umd.min.js     # Client-side PDF generator
β”‚       └── svg2pdf.umd.min.js   # SVG-to-PDF geometry converter
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css            # Universal design system (Amber/Obsidian theme)
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ app.js               # Application coordinator, UI events, pan-zoom engine
β”‚   β”‚   └── engine/
β”‚   β”‚       β”œβ”€β”€ bezier-tracer.js # Continuous cubic BΓ©zier curve tracing
β”‚   β”‚       β”œβ”€β”€ edge-depth.js    # Canny edge detection & focus depth mapping
β”‚   β”‚       β”œβ”€β”€ image-ops.js     # Bicubic Hermite resampling & bilateral smoothing
β”‚   β”‚       β”œβ”€β”€ logo-engine.js   # Dedicated 90Β° corner & spot color optimizer
β”‚   β”‚       β”œβ”€β”€ pipeline.js      # Systematic 6-step vector orchestration
β”‚   β”‚       β”œβ”€β”€ potrace.js       # Client-side Potrace curve fitting port
β”‚   β”‚       β”œβ”€β”€ quantizer.js     # CIELAB Delta E color quantization
β”‚   β”‚       β”œβ”€β”€ tonal-studies.js # Otsu monochrome, 4-tone/8-tone, bridge stencils
β”‚   β”‚       └── worker.js        # Background Web Worker sandbox
β”‚   └── vendor/                  # Bundled engine vendor modules
β”œβ”€β”€ index.html                   # Primary Studio Workbench application
β”œβ”€β”€ about/
β”‚   └── index.html               # Clean URL directory endpoint (/about/)
β”œβ”€β”€ workflow/
β”‚   └── index.html               # Clean URL directory endpoint (/workflow/)
β”œβ”€β”€ vite.config.js               # Vite multi-page build configuration
β”œβ”€β”€ package.json                 # Project manifest & npm scripts
β”œβ”€β”€ README.md                    # Repository documentation
β”œβ”€β”€ LICENSE                      # Official MIT License
└── SECURITY.md                  # Security and vulnerability policy

πŸš€ Quickstart & Local Development

1. Clone the Repository

git clone https://github.com/deekshithvodela/c2vector.git
cd c2vector

2. Install Dependencies & Start Dev Server

npm install
npm run dev

Open your browser at http://localhost:5173/c2vector/.

3. Build for Production

npm run build
npm run preview

3. Run Automated Quality & Verification Suites

# Run the complete automated test & verification suite:
npm test
# (or: node scripts/suite.mjs)

# Generate luxury OpenGraph social preview card suite:
npm run generate:og
# (or: node scripts/suite.mjs --og)

🌐 GitHub Pages Deployment Guide

To deploy the production-ready Progressive Web App to GitHub Pages (https://deekshithvodela.github.io/c2vector/):

  1. Dedicated Repository (Recommended):
    cd c2vector
    git init
    git add .
    git commit -m "feat: release c2vector production suite"
    git branch -M main
    git remote add origin https://github.com/deekshithvodela/c2vector.git
    git push -u origin main
  2. In GitHub repository Settings $\to$ Pages, set:
    • Source: Deploy from a branch
    • Branch: main / / (root)
  3. The site will be instantly live at https://deekshithvodela.github.io/c2vector/.

πŸ“Š Quality & Production Standards (ISO/IEC 25010)

  • Functional Correctness: 98 / 98 automated Playwright and AST tests passing.
  • Accessibility (WCAG 2.2 Level AA): High-contrast ratios ($\ge 4.5:1$), complete keyboard navigation, explicit button types, aria-hidden decorative SVGs.
  • Performance: Sub-second First Contentful Paint (FCP), hoisted early font preconnects, Web Worker offloaded CPU tasks.
  • Security: Zero DOM XSS vectors, explicit HTTPS protocols, rel="noopener noreferrer" on all external links, character entity encoded contact emails.
  • Clean URLs: Universal directory routing (/, /about/, /workflow/) without .html extensions.

πŸ‘€ Author & Credits

Designed and engineered with mathematical determinism by Deekshith Vodela.


πŸ“„ License

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

Copyright (c) 2026 Deekshith Vodela

About

High-precision 100% private in-browser image to scalable vector & SVG converter studio with 0% Generative AI.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages