Back to browse
GitHub Repository

Render JPEGs direct to 32-bit RGB pixels

1 starsC++

Floating-Point JPEG Decoder

by rsaxvc·Feb 12, 2026·3 points·0 comments

AI Analysis

PassWizardryNiche Gem
The Take

This repo rips out STB-Image's fixed-point iDCT and 8-bit pipeline and replaces it with a float32 path so YUV->RGB conversion and resampling keep extra precision — you can actually see less banding in the provided GIFs and histograms. It also supports encoding float pixels back to JPEG and ships demos that explore recompression stability, which is a neat, very focused trick if you only have JPEGs (RAW still wins).

Category
Target Audience

Graphics and image-processing developers, plugin authors, photographers and researchers concerned with JPEG decoding artifacts

Post Description

I modified STB-Image's JPEG codec to render JPEG files directly to 32-bit floating-point pixels to reduce color banding when editing images.

Coincidentally, this can recompress JPEGs much more consistently, eventually stabilizing when the recompression gives an image the exact same compressed file.

Similar Projects

Developer Tools●●Solid

A Solidity CLI Tracer and Debugger

CLI-native Tenderly alternative for Foundry with revm-based transaction replay.

Niche GemSolve My ProblemShip It
tomw1808
202mo ago