Oh boy, this is going to be a doozy of a blog post.I’ve spent the last three months in New York at the Recurse Center, developing an understanding of the fundamentals of digital photography.Something that’s been really, really rewarding about this project is that I’ve been able to take my own images, start with the actual bits in a hex editor, and interpret them into images that progressively become more faithful and more beautiful, the more code I write.Well, almost. There was one minor hiccup – all of the RAW files I’ve shot over the last 3 years have been encoded with Fuji’s lossless image compression algorithm. This is a fantastic technology as a photographer – 50 MB files are swiftly reduced to 25 MB, with literally no reduction in quality – but if you’re writing your own processor, then you need to decompress the data, and compression algorithms are usually complex.When should you implement something yourself?I knew that this was going to be a rabbit hole before I started. I could hear the voice of my former boss saying “Fabian. Do you really need to be doing this?”.I’ve written about Yak Shaves before, and in theory I should know better – but, part of what attracted me to the Recurse Center in the first place was it seemed like a place where going down rabbit holes was permitted. Maybe not advised, but definitely permitted. So, in the first week of February, I found myself trying to figure out how Fuji’s lossless image compression technology worked.The thing was, I already had the ability to load compressed Fuji RAF files in my software – the excellent, albeit minimally documented, LibRaw project has had support for this since 2016, and my code was initially loading files by binding to LibRaw. At some point, though, I got frustrated with not knowing exactly what was in my RAW file. Libraw is functionally very good, but it doesn’t do a good job of surfacing what its sources are for any given piece of data. One thing led to another, and at some point I’d decide...
First seen: 2025-09-30 12:37
Last seen: 2025-09-30 20:39