Through a cruel coincidence, my mother has an iPhone, but her computer runs Windows.

She has struggled for years with this situation at every stage. Very uncool moves from both Apple and Microsoft have conspired to keep her phone and computer apart, and even to this day, she still couldn't figure out how to open the photos she takes with her phone...

There are tons of excellent peices of software out there for handling images -- Krita, ImageMagick, and others. However, as far as I can tell, none of them natively support HEIC images. Frankly, it's a very bad vibes situation.

So, after coming up emptyhanded, with nothing I could recommend to her that would directly open a HEIC file, I decided to take matters into my own hands and just make one. Little did I know, I was about to learn more than I ever really wanted to about why none of these exist.

EDIT: It turns out that the Windows Photos app actually was converting the HEIC photos to jpeg, she just wasn't able to find where the photos app was putting the jpeg files. So this might not be important for windows users, but I'm keeping this post up in case anyone needs to write, for example, a web application that can read HEIC images.

animated gif screencast of the application working. The application is double-clicked, then the Windows Defender popup appears warning that the program is unknown and not signed. When the program opens, it pops a file chooser immediately. Two .heic files are selected, then an input box appears prompting the user to enter a jpg quality between 1 and 100. Finally, a progress bar appears, and after a few seconds, the finished JPGs are in the folder next to the original heic files. When the user tries to open the heic file, it doesn't work, complaining about missing codecs. When the user opens the jpg, it displays an aerial photo of a tropical beach.

Code Repository

https://git.sequentialread.com/forest/heic-converter-gui

This application is written in Go, but the actual image conversion is handled by libde265 (C++ code) that was compiled to WebAssembly via Emscripten and runs inside an embedded WebAssembly runtime that was written in Go. (Similar to The Carcinization of Go Programs 🦀)

This is really good because it should work on any CPU architechture and any OS platform, there are no annoying platform-dependent C/C++ compiler issues to deal with. It runs about 10 times slower than the native option, but it works, and it's really easy to use, so I think thats what matters most.

🙇 Big thanks to the person who made that happen! 🙇

Usage Notes

If you want lossless output you can specify png 1 (the quality number is ignored for PNG).

Only use png if you want to edit the image and then compress it further with jpeg / avif. The png files will be massive.

This tool strips all EXIF data but it should preserve the rotation that is present in the EXIF Orientation attribute.

Comments