Chris Lomont's Posts Page
Wed, Nov 11, 2026 - 7400 Words
How pictures should be resized, rotated and dithered, and how to judge the result. Three articles: expert notes with the mathematics, measurements and references; a plain-language summary
; and a checklist of best practices and gotchas
.
Read more →
Wed, Nov 11, 2026 - 13900 Words
What the numbers in a picture mean, from the CIE observers to HDR formats, and how they go wrong. Four articles: expert notes with computed figures and references; a general-audience summary
; a guide to best practices, gotchas and recognizing errors
; and reference tables
with formulas.
Read more →
Wed, Nov 11, 2026 - 2800 Words
What the sampling theorem promises, where each of its assumptions fails, and what replaces it. Three articles: expert notes with error budgets and references; a general-audience summary
; and a checklist of best practices and gotchas
.
Read more →
Sat, Sep 12, 2026 - 1300 Words
A monospace vector font for debug overlays: 95 ASCII glyphs of lines and quadratic beziers in 1.8 KB of data, a decoder you can read over coffee, and an anti-aliased pixel writer. Public domain.
Read more →
Fri, Jul 26, 2024 - 2700 Words
Derivation of a minimal size tree for playing perfect tic tac toe
Read more →
Mon, Aug 28, 2023 - 2700 Words
This is a note on the correct usage of alpha blending, pre-multiplied alpha, gamma correction, and linear colors for image processing.
Read more →
Sun, Jul 23, 2023 - 1100 Words
XCode corrupts PNG images for iOS builds. This post details the error.
Read more →
Sat, Jun 24, 2023 - 2300 Words
Variation among SSIM implementations make comparing results a mess. This version matches the output of the original, unlike most of those in common use as of 2023.
Read more →
Tue, Jun 6, 2023 - 2600 Words
This is a quick note for converting byte values colors in 0-255 back and forth to floating-point colors in 0-1 which avoids common errors.
Read more →
Tue, Nov 22, 2022 - 4800 Words
A robust, portable, extensible method for handling button presses when interfacing software and hardware.
Read more →
Sat, Aug 27, 2022 - 700 Words
A robust algorithm for computing roots of quadratic equations, much better than common code.
Read more →
Fri, Aug 26, 2022 - 1000 Words
Notes on floating point issues, including lists of facts and theorems useful for algorithm development.
Read more →
Mon, Dec 7, 2020 - 4000 Words
I built a RTK-GPS gadget and wrote enough software to do basic GNS tasks such as finding distances, decoding GPS NMEA and RTCM messages, finding intersections, and doing boundary detection.
Read more →
Sun, Jun 23, 2019 - 3200 Words
Over decades I’ve written a lot of personal code. I made a bar chart race showing how many lines I’ve written in different languages over time.
Read more →
Sat, Jun 1, 2019 - 1400 Words
Here’s a brief summary of C# features by version.
Read more →
Wed, Nov 1, 2017 - 300 Words
Here’s a math puzzle.
Read more →
Mon, May 1, 2017 - 8100 Words
Here’s FRACTRAN, a weird fraction based programming language, written in FRACTRAN.
Read more →
Sun, Mar 5, 2017 - 1500 Words
How does one generate uniform random numbers in [0,1] using IEEE 754 floating point formats? It’s tricky.
Read more →
Tue, Feb 21, 2017 - 900 Words
Here’s bit tricks for efficient divisibility testing.
Read more →
Sat, Sep 17, 2016 - 400 Words
This is a hard puzzle about using two NOT gates to build three.
Read more →
Mon, Aug 29, 2016 - 5900 Words
Here’s some notes on compression.
Read more →
Mon, Aug 29, 2016 - 1700 Words
Here’s an embedded compression format I designed to meet certain requirements. It’s small, fast, and efficient.
Read more →
Tue, Aug 23, 2016 - 900 Words
What’s the average length of a segment chosen uniformly by area on a unit square?
Read more →
Tue, Aug 23, 2016 - 2300 Words
This is a nicely hard problem in the common prisoners and warden format.
Read more →
Tue, Aug 23, 2016 - 200 Words
Here’s a result that is completely non-intuitive.
Read more →
Fri, Jul 1, 2016 - 100 Words
A post to test site features such as tables, math, code…
Read more →