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

9 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 & Line-Art Engine

  • 90-Degree Corner Preservation: Tightened straight-line tolerance (optTolerance: 0.08) and aggressive corner retention (alphaMax: 0.15) ensure crisp right angles on corporate branding, sharp brackets, and geometric marks.
  • Dual-Pass Glyph & Stroke Optimization: For hand-drawn line art and intricate illustrations, a two-pass Connected Component Labeling (Union-Find) mask calibrates stroke thickness within Β±0.5% of master line weight while preserving compact micro-glyphs, handwriting, and fine dots with smooth $G^1$ cubic BΓ©zier curves (alphaMax: 0.72, optTolerance: 0.10).
  • Exact Alpha Mask & Alpha-Bounded Color Trapping: Directly preserves 100% of external and internal transparent cutouts (typography counter loops, filigree, negative space) while sealing adjacent color seams with 1px alpha-bounded trapping.
  • Adaptive Natural Spot Color Discovery: Clusters anti-aliased transition pixels into dominant spot colors (up to 32 inks) without artificial color clipping, plus 1-Click Transparent Background Knockout.

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.
  • 2-Tone Duotone Print Plate: Clean Key Dark & Midtone ink separation for screenprinting and editorial graphics.
  • 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 & Dynamic Naming

  • In-browser compilation using jsPDF and svg2pdf.js.
  • Exports an Executive Cover Page plus all 12 vector plates into a single 13-page master PDF document (<source>_<mode>_master_suite_c2vector_DV.pdf), with consistent dynamic filenames for individual SVGs and scaled PNGs (@1x, @2x, @4x).
  • 100% Pure Vector BΓ©zier Streams: Infinite print scalability with strictly 0 raster compression artifacts.

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

  • Crisp Native ViewBox Zoom (1x–8x): Hardware-smooth pan, touch-drag, wheel zoom, soft boundary clamping, and dedicated Center control that preserves active magnification without GPU raster blur.
  • 13 Specialized Artboards: Rapid switching between Vibrant v2, Faithful Master, 8-Tone Color, Pixel Match, 1-Bit Mono, 2-Tone Duotone, 4-Tone/8-Tone Positive & Negative Plates, Bridge Stencil, Canny Hairline Edges, and Chromatic Contours 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-v12)
β”‚   β”œβ”€β”€ 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)
β”‚   β”‚   β”œβ”€β”€ 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
β”œβ”€β”€ scripts/
β”‚   └── suite.mjs                # Unified automated verification, privacy audit & OG card CLI
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css            # Universal design system (Amber/Obsidian theme)
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ app.js               # Application coordinator, UI events, native ViewBox pan-zoom
β”‚   β”‚   β”œβ”€β”€ engine/
β”‚   β”‚   β”‚   β”œβ”€β”€ bezier-tracer.js # Continuous cubic BΓ©zier SVG builders
β”‚   β”‚   β”‚   β”œβ”€β”€ image-ops.js     # Bicubic resampling, bilateral denoise & Canny edge detection
β”‚   β”‚   β”‚   β”œβ”€β”€ logo-engine.js   # Dedicated Logo, Typography & Line-Art vector engine
β”‚   β”‚   β”‚   β”œβ”€β”€ pipeline.js      # Systematic 6-step photographic vector orchestration
β”‚   β”‚   β”‚   β”œβ”€β”€ potrace.js       # Client-side Potrace curve & subpath fitting port
β”‚   β”‚   β”‚   β”œβ”€β”€ quantizer.js     # CIELAB Delta E color science & median-cut quantization
β”‚   β”‚   β”‚   β”œβ”€β”€ tonal-studies.js # Otsu 1-bit, exact alpha mask, stencil & dual-pass line art
β”‚   β”‚   β”‚   └── worker.js        # Background Web Worker sandbox
β”‚   β”‚   └── export/
β”‚   β”‚       β”œβ”€β”€ pdf-builder.js   # 13-page pure vector PDF suite compiler
β”‚   β”‚       └── png-exporter.js  # OffscreenCanvas 1x/2x/4x PNG raster exporter
β”‚   └── 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
β”œβ”€β”€ CONTRIBUTING.md              # Contribution guidelines & code quality standards
β”œβ”€β”€ 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

4. 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: 41 / 41 high-signal composite automated Playwright, geometry, transparency, and privacy tests passing (npm test).
  • 7-Vector Privacy & Leak Hygiene: Verified 0 exposed local developer paths, 0 internal agent metadata paths, 0 private IPs, 0 hardcoded secrets, and 0 unstripped sourcemaps across both src/ and compiled dist/.
  • Accessibility (WCAG 2.2 Level AA): High-contrast ratios ($\ge 4.5:1$), complete keyboard navigation, explicit type="button" on all interactive buttons, aria-hidden decorative SVGs, and prefers-reduced-motion support.
  • Performance: Sub-second First Contentful Paint (FCP), hoisted early font preconnects, Web Worker offloaded CPU tasks, and 60fps native ViewBox pan/zoom.
  • Security: Zero runtime npm dependencies, zero DOM XSS vectors (eval() / new Function()), explicit HTTPS protocols, rel="noopener noreferrer" on all external links, and 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