← home

the second file wasn’t free, so i built a converter

a friend needed some university files to open in qgis. because she was on an old intel mac she had some compatibility issues and got this:

Wrong JPEG library version: library is 62, caller expects 80

very helpful as i am, and as an it guy i pulled the classic of asking her to reinstall qgis. didn’t work… other images were opening fine. but these particular files just weren’t cooperating.

so i had the thought of maybe just trying to convert the files to a version the mac supported. my first idea was just to ask her to get someone who could open the file to do it for her and send it. but before that i got the better idea of just trying to find an online converter that could rewrite the file into something qgis would read. and that actually worked.

but when she needed to do another one, there was a paywall there and as a student she of course did not want to pay (which i get). i asked her to change browser and use hotspot from her phone to try and “bypass” the paywall for the second file. the people behind the website were smarter than i thought as that did not work.

so naturally it occurred to me in the day of ai why not just spin up an agent to build a converter. so that’s exactly what i did. sending screenshots of the chat and debug images was all it needed along with the requirement that i wanted it to run locally through webassembly for simplicity (i’m also a cheapskate and image uploads/storage etc. seem too much of a hassle for something like this).

in the technical sense the heavy lifting comes from gdal, through gdal3.js, which runs it in the browser using webassembly. i mostly put a simple interface around some very capable open-source software.

drop a file, convert it, save the result. the original use case was rewriting troublesome images into a fresh geotiff that qgis could open.

the nice part is that your files never need to leave your computer. your machine does the conversion, so i don’t have to pay to process and store everyone’s enormous map files. hosting the site costs me basically nothing extra. also useful if your internet isn’t great as once the conversion engine loads, there’s no giant file to upload.

so i asked the agent to spin it up on my vps and set up ci/cd stuff with coolify.io (super nice open-source software i got to say). deployment went well. my friend tried to use it but…

obviously the first version had a small detail wrong: she couldn’t select her jpg in the file picker. i had started with only tiffs. excellent conversion speed when nobody can select a file….

told her to give me 1 minute, it was one prompt and it was done and dusted. and finally working (took me 5 minutes of actual work). she thought i had hacked the website as she did not know i had made it she just thought it was another free converter i had sent. crazy how this would have taken a whole day or so at least just a couple of years ago. i think software might be solved in many cases. and if not yet, will be in a couple more years. gets me wondering how the world will change going forward, which professions might go away. or if it’s just a big bubble.

anyway since then i’ve added a few more formats, bug reporting, and some half-assed seo for people searching the same wonderfully unhelpful error. i guess browser memory still puts limits on what it can handle so it won’t fix every file.

if i get around to it, an interesting next step might be to create a service agents can use (or maybe even a qgis plugin for chatgpt or something) to send a conversion job, pay a tiny amount through something like x402, get a usable file back. cover the processing cost, add a small margin. and then i should probably check the full dependency licenses and maybe more importantly figure out whether anyone actually needs it. (should be a painkiller, not a vitamin).

for now, it’s a free tool that helped my friend get back to her work.

i think that is good enough reason to ship something. gave me some meaning at least.