GIMP Fixes CMYK JPEG Loading Ahead of 3.3.2: Developers Verify an Issue Flagged by AI
The article's text, from Joho no Todai's page.
On December 5, 2026, the team behind the open-source image editor GIMP merged a fix into its main development branch for a bug when loading CMYK JPEGs. The fix is tracked for GIMP 3.3.2.
CMYK represents color with four components: cyan, magenta, yellow, and black. It's used in printing. When GIMP loads a CMYK JPEG, it converts the image to RGB, which represents color using red, green, and blue.
The problem was how GIMP declared the pixel format before conversion. Even when GIMP decoded a JPEG at higher precision and stored the result as 16-bit integers, it told the babl color conversion library that the CMYK data used 8-bit integers. The format used to read the pixels differed from the format in which they were stored.
The fix retains cmyk u8 for the 8-bit path and uses cmyk u16 for the higher-precision path. That lets color conversion run with the correct pixel format.
The developer who merged the fix also verified it on a separate CMYK test image.
Getting finer tonal detail from 8-bit JPEGs
The format mismatch began affecting 8-bit CMYK JPEGs after GIMP changed how it loaded JPEGs to improve image quality during editing.
On June 24, GIMP merged a change to decode JPEGs at higher precision. With version 3.1.90 or later of libjpeg-turbo, the library that handles decoding, GIMP uses 12-bit decoding even for lossy 8-bit JPEGs. GIMP has no internal 12-bit pixel format, so it stores the image using 16-bit integers.
Why does 12-bit precision help when opening an 8-bit JPEG?
JPEG decoding involves calculating pixel values. Rounding them to 8 bits, as the old method did, erases small differences in those calculations. Converting the loaded image to 16 bits can't recover differences already lost to rounding.
The developer who implemented higher-precision loading noted that brightening the shadows in an underexposed photo can make banding visible. More precise decoding can help when the input exceeded 8-bit precision before compression or when a JPEG was saved at high quality.
A GIMP maintainer compiled libjpeg-turbo and compared two ways of opening a JPEG supplied by the developer. One used the old 8-bit path and converted the result to 16 bits. The other loaded directly into the 16-bit format using the new path.
The test images looked similar when first opened. After a Levels adjustment, which changes the range of light and dark tones, the image loaded at higher precision showed less of the banding visible in the image loaded the old way.
Lossy JPEG compression discards some image information during encoding. Decoding at higher precision can't restore it. The benefit comes from avoiding further loss of tonal detail when decoding the information the JPEG still contains. Simply opening a photo, before editing even begins, can affect the quality of the final result.
The stable branch dropped higher-precision decoding
One developer noted that higher-precision JPEG loading could increase memory use. Another said the numeric readout for color components in images loaded at higher precision would change from 8-bit to 16-bit values.
On August 16, higher-precision decoding also landed in the GIMP 3.2 stable branch. The developer who merged the CMYK fix raised concerns about changing how the stable release loads a major image format before more users could test it in the 3.3 development series.
The change was reverted in the stable branch on August 28.
The JPEG loader in the stable GIMP 3.2.8 release lacks the feature that routes 8-bit JPEGs through the 12-bit path. Its code still specifies an 8-bit integer format when it loads a higher-bit-depth CMYK JPEG through the higher-precision path.
Better results on one image still leave questions about other color models and processing conditions. The fix shows the value of testing widely in development builds.
Developers verify the issues raised by generative AI
The developer who implemented higher-precision loading said they had asked AI to port their implementation to another image editor, and it suggested several changes to the original implementation. These included the CMYK pixel format and an issue on big-endian systems, which store the most significant byte of a multibyte number first.
Another developer warned that generative AI can flag defects that don't exist and asked that its suggestions be verified before they were brought to the project.
A GIMP maintainer reiterated the project's ban on generative AI. The maintainer said developers could write their own fixes for bugs they had verified, and said they didn't have time to investigate the issues themselves.
The developer who implemented higher-precision loading said they would write fresh code for the fix. When submitting the CMYK fix, they declared that it included no AI-generated code, text, or images. Another developer verified it with a CMYK image before it was merged. A separate fix was proposed for loading JPEGs on big-endian systems.
AI sometimes points to real issues. Each of its other claims still needs to be checked. The time spent checking falls to developers. The original higher-precision work already involved a developer preparing a test image and a maintainer compiling the library to compare the results.
Developer time is limited. I'd judge the work by what improved in actual images, regardless of how many issues the AI listed.
