Skip to content

Only check DHT marker for libjpeg-turbo #9025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

radarhere
Copy link
Member

Resolves #9024

The issue found that with libjpeg, rather than libjpeg-turbo, a test checking for a DHT marker is not found.

From https://en.wikipedia.org/wiki/JPEG, a DHT marker is

Define Huffman Table(s)

and it

Specifies one or more Huffman tables.

From https://github.com/libjpeg-turbo/libjpeg-turbo,

libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines

It doesn't seem unreasonable that libjpeg-turbo would have different output regarding Huffman tables.

This PR skips checking that marker if libjpeg-turbo is not used.

@radarhere radarhere added the JPEG label Jun 18, 2025
@radarhere radarhere changed the title Only check for DHT marker with libjpeg-turbo Only check DHT marker for libjpeg-turbo Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_separate_tables failure with pillow 11.2.1
1 participant