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 WebP support to ImageSize #10397

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Add WebP support to ImageSize #10397

merged 3 commits into from
Nov 22, 2024

Conversation

silby
Copy link
Contributor

@silby silby commented Nov 21, 2024

My code feels a bit messy and I've tested it with like precisely one WebP image per variant (lossy, lossless, and extended). I found myself having/wanting to combine attoparsec (to get Alternative and backtracking) and Data.Binary.Get (to get numbers); maybe there's a less awkward looking way to do this.

This is an API change because the constructors of ImageType are public.

Closes #9561

@tarleb
Copy link
Collaborator

tarleb commented Nov 22, 2024

This code is quite low-level, which makes me think that it would better be placed in a different package. Would extending JuicyPixels be an option?

@silby
Copy link
Contributor Author

silby commented Nov 22, 2024 via email

@jgm jgm merged commit 1e92881 into jgm:main Nov 22, 2024
9 of 12 checks passed
@jgm
Copy link
Owner

jgm commented Nov 22, 2024

I think this is fine; in the past we used all kinds of low-level code to find image sizes; JuicyPixels allowed us to remove a lot of this low-level stuff, but if we still need it for webp, okay.

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.

pandoc metadata "cover-image" doesn't recognize WebP image
3 participants