**Show HN: Floating-Point JPEG Decoder**

The world of image compression just got a whole lot more interesting with the emergence of jFloaty, a floating-point JPEG decoder that's about to revolutionize the way we think about color reproduction in digital images.

jFloaty is built on top of STB-Image and STB-Image-Write, two highly acclaimed image processing libraries. However, unlike its predecessors, jFloaty takes it up a notch by utilizing floating-point pixels instead of integer quantization. This means that the library can decode JPEGs directly to 32-bit float pixels without any loss of precision.

But what does this mean for users? In essence, jFloaty offers two major benefits: improved color accuracy and reduced banding artifacts. To illustrate these advantages, let's take a look at an image that has undergone the "auto input level" feature in GIMP. As you can see, the original JPEG file suffers from significant banding issues (the blockier one on the left), whereas jFloaty's output is much smoother and more natural-looking.

So, what happens when we take a JPEG file and recompress it infinitely many times? We might expect to see some level of degradation in image quality. But surprisingly, even after multiple iterations of compression and decompression, the resulting image still looks remarkably similar to the original (check out the zoomed-in version on the right). Of course, there are some minor differences visible as blue speckles within 2/255 digital codes. These tiny discrepancies only become apparent upon close inspection.

However, if we were to zoom in further and examine the edges of the image, we'd notice some more pronounced artifacts – red speckles that indicate larger differences between successive codec iterations. These imperfections are limited to specific regions on the right and bottom edges, but they're still a reminder of the inherent limitations of JPEG compression.

Overall, jFloaty represents a significant leap forward in image processing technology. By leveraging floating-point arithmetic, this innovative library enables developers to create more accurate and visually appealing images with reduced banding artifacts. It's an exciting development that promises to transform the way we work with digital images.

**Comparisons:**

Original JPEG file
JPEG decoded using jFloaty

Thoughts and comparison between STB-Image and jFloaty:

jFloaty builds upon the foundation established by STB-Image, a highly respected image processing library. However, while STB-Image relies on integer quantization to decode JPEGs, jFloaty takes a more nuanced approach by using floating-point pixels. This subtle but significant distinction makes all the difference in terms of color accuracy and overall image quality.