• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
MRPRRSIDENT

MRPRRSIDENT

Jpegconversionfrtb

Convertion for frtb jpeg files
Public
Like
Jpegconversionfrtb
Home
Code
7
backend
1
frontend
3
untitled-folder-2697
1
README.md
main.ts
H
new-file-3657.ts
new-file-9836.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
11/25/2025
Viewing readonly version of main branch: v49
View latest version
README.md

JPEG/HEIF to HTML OCR Converter

A robust web application that allows users to upload JPEG and HEIF images and convert them to HTML using advanced OCR (Optical Character Recognition) with mathematical formula preservation. Now with enhanced HEIF support and improved error handling.

Features

  • Enhanced HEIF Support: Robust handling of HEIF/HEIC files with automatic conversion to JPEG
  • Drag and Drop Interface: Easy file upload with visual feedback for JPEG and HEIF formats
  • Multiple File Upload: Process up to 60 files simultaneously with batch processing
  • Advanced OCR: Text recognition using Tesseract.js with mathematical formula detection
  • Mathematical Formula Recognition: Specialized detection and preservation of mathematical expressions
  • LaTeX Math Rendering: Mathematical formulas preserved using MathJax in HTML output
  • Real-time Progress Tracking: Detailed progress monitoring for each file including conversion status
  • Error Recovery: Comprehensive error handling with detailed error messages
  • HTML Output Generation: Clean, styled HTML with mathematical notation properly rendered

Recent Improvements

HEIF Processing Enhancements

  • Improved Library Loading: Better handling of heic2any library initialization
  • Enhanced File Detection: More robust HEIF file format detection using both MIME types and file extensions
  • Higher Quality Conversion: Optimized JPEG conversion settings for better OCR accuracy
  • Better Error Handling: Detailed error messages for conversion failures
  • Progress Tracking: Real-time status updates during HEIF conversion process

OCR Processing Improvements

  • Enhanced Character Recognition: Expanded character whitelist for better mathematical symbol detection
  • Improved Engine Configuration: Optimized Tesseract.js settings for mathematical content
  • Better Progress Reporting: More granular progress updates during OCR processing
  • Library Availability Checks: Robust checking for library availability before processing

HTML Output Enhancements

  • HEIF File Indicators: Clear badges showing which files were converted from HEIF
  • Enhanced Statistics: Detailed processing summary including conversion counts
  • Better Visual Design: Improved styling with file type indicators and processing notes
  • Conversion Tracking: Clear indication of which files underwent HEIF conversion

Project Structure

├── backend/
│   └── index.ts          # Main API server with HEIC support and math formula processing
├── frontend/
│   ├── index.html        # Main HTML template with MathJax and HEIC support
│   ├── index.tsx         # Frontend React application with enhanced OCR
│   └── style.css         # Custom styles with math formula styling
└── README.md

Advanced Features

HEIC Support

  • Automatic detection of HEIC/HEIF files
  • Client-side conversion to JPEG using heic2any library
  • Preview generation for HEIC files
  • Progress tracking during conversion

Mathematical Formula Recognition

  • Pattern-based detection of mathematical expressions
  • Support for common mathematical symbols (√, ∫, ∑, ∏, Greek letters)
  • Recognition of fractions, exponents, and equations
  • LaTeX-style formula preservation in HTML output
  • MathJax rendering for proper mathematical display

Enhanced OCR Processing

  • Specialized Tesseract.js configuration for mathematical content
  • Extended character whitelist including mathematical symbols
  • Multi-stage processing with conversion and OCR phases
  • Real-time progress tracking with detailed status updates

Usage

  1. Visit the application URL
  2. Drag and drop JPEG/HEIC files or click to select files (multiple files supported)
  3. Click "Start OCR Processing" to begin text and mathematical formula extraction
  4. Monitor the progress of each file being processed with specialized math recognition
  5. Once complete, click "Download HTML" to get a formatted HTML file with preserved mathematical formulas

Features in Detail

  • Drag & Drop Interface: Easy file upload with visual feedback for JPEG and HEIC formats
  • HEIC Support: Automatic conversion of HEIC files to JPEG for processing
  • Multiple File Support: Process multiple images at once
  • Mathematical Formula Recognition: Specialized OCR for mathematical expressions and formulas
  • LaTeX Math Rendering: Mathematical formulas preserved using MathJax in HTML output
  • Real-time Progress: See processing status and progress for each file
  • OCR Confidence Scores: View confidence levels for text recognition
  • Preview Images: See thumbnails of uploaded images (HEIC converted to JPEG for preview)
  • Formatted HTML Output: Clean, styled HTML with mathematical notation properly rendered
  • Error Handling: Clear error messages for failed processing
  • File Validation: Automatic filtering to accept JPEG and HEIC files

Technology Stack

  • Backend: Hono.js for API routes
  • Frontend: React with TypeScript
  • OCR: Tesseract.js for general text recognition
  • Math OCR: Specialized mathematical formula recognition
  • Math Rendering: MathJax for LaTeX formula display in HTML
  • Image Processing: HEIC to JPEG conversion support
  • Styling: TailwindCSS
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.