Skip to content
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

Add support for JPEG XL image format #455

Merged
merged 1 commit into from May 28, 2021

Conversation

TheDecryptor
Copy link
Contributor

New version of JPEG, comes with a new bitstream and container.

The actual spec for the file format is behind an ISO paywall, but it's been finalized so it shouldn't ever change at this point.

I got the magic numbers from ImageMagick as well as the reference implementation, and the mime type image/jxl from the provisional registration with IANA

Since the files come in 2 variants with quite different lengths for the header bytes I wasn't entirely sure where to add the checks, I decided to place them with the longest length variant.

And I added tests for both variants, and all tests pass locally for me.

@sindresorhus sindresorhus merged commit 57ecf2d into sindresorhus:main May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants