jFloaty: a weird littly JPEG-code and STB-image fork

Written 2026-04-23

Tags:YUV JPEG RGB 

While it was too cold to dive around here, I was editing some photos and really wished I had a few more bits in the images. Since part of the JPEG compression process is red/green/blue to YUV color conversion, I wondered if decompressing a JPEG with floating-point operations would improve it any.

jFloaty is a fork of STB-image that supports encoding and decoding JPEGs direct to floating-point images, as well as an upgraded PNG encoder with dual 8/16-bit support, and some tools like scaling and dithering. ImageMagick is far more powerful, but at the time didn't support 8-bit to floating-point JPEG decode.

After discussing with libjpeg-turbo's maintainer, dcommander, they it wasn't as simple as I thought - the quality improvements I was seeing were mostly because JPEGs store 10-bit DCT bins for 8-bit images, and they patched libjpeg to support rendering 8-bit JPEGs to a 12-bit surface with a configuration change. This is helpful for software like GIMP and Darktable, who will hopefully pull this in too. I've got a patch up for GIMP and am using it at home - much nicer than an external codec and doing JPEG->PFM->GIMP.

Google has also written a floating-point JPEG codec, jpegli though I didn't see it before making my own. They also have a smarter quantizer than the fixed Q-factor-based quantization tables of most encoders.

Felix Adventures: KC Oasis and a stray pup

Written 2026-03-01

Tags:Felix 

My son Felix and I went to Kansas City Oasis, as we do Sundays when his schedule aligns.

People there like to see him because he is so young and cute as a button. Before we left he had fallen asleep in Kate's arms and I packed him into the bucket seat, expecting him to be hungry when he awoke. We parked a few blocks away on Bell st, and when we arrived he was awake and alert and had lots of fun looking at everyone.

Eventually he was hungry and he had a good time sitting on me in the back with his bottle. He received lots of comments on his hair, which we first spotted on an ultrasound.

As it came time to leave we were both surprised by the thunder outside. When I carried him to the window for a peek, I saw hail! I had no umbrella and realized I was woefully prepared for this situation.

Our friend Julie offered to watch him until I could return with our car, and I graciously accepted.

About halfway to the car I found a medium sized black dog. He was scared and wet and shivering in the hail and came up to me immediately. Usually I would be more than happy to drive a lost pet home, but I needed to get to my son. But when I opened the door he hopped right in!

I was reminded of simple logic puzzles I had faced as a child: a hunter has a dog, two rabbits, and only one canoe. How can the hunter cross the stream in the least number of trips without mixing incompatible animals on the shore. I could not leave an unknown dog in the car with my son.

I pushed him out. As I drove toward Oasis he followed me for an entire block. A lot of the people at Oasis have, raise, or love dogs, surely if I took the dog to Oasis, we could figure things out from there. I stopped and opened the trunk and he hopped in and I was able to read his dog tags phone number.

On the way I called his owner, who explained that the thunder had scared him into bolting. Just as I arrived, Julie appeared at the door with Felix. I rolled down the window to ask for just a few minutes - I've got to deliver this dog! Just then the dog's owner arrived and we carefully opened the trunk and clipped on the leash and sent him on his way with a thank-you and handshake. I ran in, thanked Julie, washed my hands, grabbed Felix, explained the situation, and thanked Julie one last time.

Milnot Cheesecake, Choose-Your-Own Adventure Style

Written 2025-11-24

Tags:Milnot Cheesecake 

This makes a sweet, fluffy, whipped cheesecake desert. I'll start with the family recipe, then go into specifics that can be tuned.

What is Milnot?

Well it's not milk, that much is for certain. Through the magic of science and technology, Milnot is canned, evaporated milk that has had its milkfat replaced with vegetable fat. Originally a cost effective, shelf-stable milk, it can sometimes be found in midwest grocery stores. I've never seen it used for anything other than this recipe. It has a peculiar property, in that it whips exceptionally well. Though you can also use evaporated milk, which is more common.

A bit of history

Originally Milnut, Milnot dates back to the great depression. Due to interstate commerce milk purity laws, the original cans stated something like "not to be confused with evaporated milk". The Milnot factory stradles the Missouri-Oklahoma border.

A Base Recipe for Milnot Cheesecake

Ingredients

Steps

  1. Place the Milnot in the freezer - want this to be as cold as possible. Also, don't take a break and forget it's in there!
  2. Dissolve the Jello in 1 cup of boiling water. Once dissolved, place in the freezer on a hot pad until slightly thickened - this should take about 20 minutes.
  3. Cream the cheese, vanilla, and sugar together. I do this in a Kitchenaid mixer - if you have the paddle blade with rubber scrapers, use that. Otherwise take a few breaks to knock down the mix that works its way up the sides of the bowl. We want to ensure all sugar has dispersed into the cream cheese.
  4. Mix in the Jello just a bit at a time and set aside. I turn on the mixer, add a splash of Jello, and wait for it to disperse. These two materials, cheese and Jello-water, won't want to mix naturally. Using cold cream cheese or adding Jello too quickly is more likely to form pearls of cream cheese that don't mix smoothly.
  5. Whip Milnot until fluffy. Use the whisk attachment on the mixer. This works best the colder everything is. Placing the mixer bowl in the freezer for a few minutes can help too.
  6. Fold whipped Milnot into jello-cheese
  7. Pour into graham cracker crust
  8. Refrigerate overnight

Fluffy or Richer?

My wife tends to prefer a richer Milnot cheesecake - no worries, double the cream cheese and read on!

Cream cheese to Sugar Ratio

The above family recipe calls for 1 cup of sugar per block of cream cheese. This is on the higher end of what I have seen used, but hey, it's a dessert! I've seen other receipes go as low as 1/3 cup of sugar per 8oz cream cheese, and from experience that's too low, and you get too much cream cheese tartness. 1/2 cup or 2/3 cup of sugar per block is also good.

I'm not considering the sugar and tartness of the Jello since those are somewhat balanced already in the Jello.

Other Flavors

We can swap out the Jello for other flavors, and sometimes the lemon juice too. Lime Jello and lime-juice makes for a nice lime cheesecake. Cherry jello and lemon juice is good too. I'd lean more on the stronger fruit flavors. Certainly no celery.

Older