Overview
XennConvert is a 100% client-side image processing application built for modern web browsers. It leverages cutting-edge web technologies to deliver desktop-grade performance without uploading any data to external servers. This documentation provides comprehensive technical details for developers, system architects, and enterprise customers.
Architecture
XennConvert operates entirely within the browser sandbox, utilizing:
- Canvas API: For pixel-level image manipulation and format conversion
- WebCodecs: For hardware-accelerated video frame decoding (HEIC/HEIF)
- Blob URLs: For memory-efficient file handling without disk I/O
- Web Workers: For non-blocking background processing
All conversion logic runs in the main thread for formats that require synchronous UI updates, while heavy operations like PDF generation and batch processing are offloaded to background workers.
Performance Benchmarks
Performance varies by device capabilities, but typical benchmarks on modern hardware (2024+):
| Operation | Avg Time | Notes |
|---|---|---|
| JPEG → PNG | ~50ms | 1080p image |
| PNG → JPEG | ~40ms | 1080p image |
| HEIC → JPEG | ~200ms | iPhone photo |
| PDF → PNG | ~500ms | First page only |
| SVG → PNG | ~150ms | Vector rasterization |
HEIC Decoder Pipeline
HEIC (High Efficiency Image Container) decoding utilizes the heic2any library, which implements a pure JavaScript decoder for the HEIF container format. The pipeline:
- Parses the HEIF container structure to locate image items
- Extracts the HEVC (H.265) encoded bitstream
- Decodes frames using WebAssembly-based HEVC decoder
- Outputs RGBA pixel data to a canvas for conversion
Limitations: Very large HEIC files (>50MB) may cause memory pressure on mobile devices. We recommend files under 20MB for optimal performance.
PDF Generation Engine
XennConvert generates PDF documents using two approaches:
Binary PDF Wrapper
For image-to-PDF conversion, we construct a minimal PDF 1.4 document structure manually, embedding the JPEG data as a direct stream object. This approach:
- Avoids external dependencies (no jsPDF required)
- Produces smaller file sizes (~50KB overhead)
- Is compatible with all PDF readers
jsPDF Integration
For multi-page documents and advanced features (watermarks, metadata), we use the jsPDF library loaded from CDN. This enables:
- Multiple images per page
- Custom page sizes (A4, Letter, Legal)
- Text overlays and watermarks
- Document metadata and bookmarks
SVG Vector Tracer
For SVG-to-raster conversion, we render the SVG element directly onto a canvas using the browser's native SVG renderer. The process:
- Parse the SVG string into a DOM element
- Serialize to a data URI with proper XML encoding
- Load as an
<image>element - Draw onto canvas at target resolution
- Export as PNG or JPEG
Note: SVGs with external resources (linked images, fonts) may not render correctly if those resources are unavailable. Inline SVGs work flawlessly.
Enterprise API Reference
XennConvert Enterprise provides a JavaScript API for embedding conversion capabilities into your own applications:
// Initialize the converter
const converter = new XennConvert({
workerPath: '/path/to/worker.js',
maxConcurrent: 4
});
// Convert a single file
const result = await converter.convert(file, {
format: 'png',
quality: 0.9,
resize: { width: 1920, height: 1080 }
});
// Batch convert multiple files
const results = await converter.batchConvert(files, {
format: 'jpeg',
quality: 0.85,
onProgress: (progress) => console.log(`${progress}% complete`)
});
For API access, contact our enterprise sales team at contact@xenncorp.com.
Self-Hosted Deployment
XennConvert can be deployed on your own infrastructure for complete data isolation:
Requirements
- Static file server (Nginx, Apache, CDN)
- HTTPS enabled (required for some browser APIs)
- No backend server required (100% client-side)
Deployment Steps
- Download the self-hosted package from your enterprise dashboard
- Extract to your web server's document root
- Configure your domain in the license file
- Access the application via your domain
All assets are static files—no database, no server-side processing, no runtime dependencies.