惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
S
SegmentFault 最新的问题
博客园 - Franky
博客园_首页
T
Tailwind CSS Blog
雷峰网
雷峰网
罗磊的独立博客

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a 100% Client-Side HEIC to JPG Converter: Zero S...
ludy.dev · 2026-06-01 · via DEV Community
Cover image for Building a 100% Client-Side HEIC to JPG Converter: Zero Servers, Zero Uploads

ludy.dev

Every time I Airdrop photos from my iPhone to my Windows machine, I run into the same annoying problem: .heic files. They don’t open natively on most Windows photo viewers, and converting them is a massive pain.

When I looked for online converters, I was shocked by how sketchy they were. Most of them required me to upload my private photos to their servers, limited me to 5 files per batch unless I paid, or spammed me with intrusive ads. As a developer, I knew there had to be a better, more secure way to handle this. Why send megabytes of private image data to a remote server when our modern browsers have more than enough computing power to do it locally?

So, I spent my weekend building a 100% client-side, offline-first HEIC to JPG converter: heictojpgfree.net.

Featured Image

The Tech Stack: How it Works Under the Hood

To make this tool lightning-fast and completely private, I designed it to run entirely in the user's browser. Here is the technical breakdown:

  1. WebAssembly (Wasm) + libheif: Browsers don't natively support decoding HEIC/HEIF files yet. To bypass this, I compiled libheif (a popular C++ HEIF decoder) into WebAssembly using Emscripten. This allows the browser to parse the HEIC container and extract the raw image data at near-native speeds.
  2. HTML5 Canvas: Once the Wasm module decodes the raw pixel data, it transfers the byte array to an offscreen HTML5 canvas element. From there, I use canvas.toBlob() to compress and export it as a standard JPEG file.
  3. File System Access API: Users can drag and drop an entire folder of HEIC files. The tool processes them sequentially or concurrently based on the hardware threads available.

The Architectural Challenges

Building this wasn't without its hurdles. During testing, I noticed two major issues:

  • Memory Leaks: WebAssembly doesn't have automatic garbage collection for C++ pointers. When batch-converting 50+ high-res iPhone photos, the browser tab would frequently crash due to out-of-memory (OOM) errors. I had to strictly manage memory allocation, ensuring every decoded frame and allocation pointer was manually freed immediately after drawing to the canvas.
  • UI Thread Blocking: Initially, decoding heavy HEIC files on the main thread made the UI completely unresponsive. I resolved this by offloading the Wasm decoding process to Web Workers. This keeps the browser UI running at a buttery-smooth 60fps, even while batch-processing dozens of images.

Give it a Spin

The result is a clean, minimal utility at heictojpgfree.net. No signups, no paywalls, and absolutely no data leaves your machine.

I'd love to hear your thoughts on the performance! How do you handle heavy image processing on the frontend? Drop your feedback or questions in the comments below!