-
Notifications
You must be signed in to change notification settings - Fork 275
Avif support ? #557
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
Comments
good suggestion. IMHO, avif has a bright future. what do you think of it? @vapier |
if there's a standard lib for it that we can find via pkg-config, sounds find to have as optional |
@vapier I'm not familiar with |
Note : There's now a caniuse result for avif support : https://caniuse.com/#feat=avif |
Hi @Nuranto. Thanks for your concern and help. |
Hey, all! I'm interested in taking this on - possibly with a collaborator at my company. I know other folks who've integrated libavif into a project without undue trouble :) I've not contributed to this project before. Are there guidelines a first-time contributor should follow aside from what I see here? |
that doc should about cover it. if it's missing something, we should def add it! |
Great - thanks @vapier ! |
Update: with some kind guidance from @vapier , I am making good progress on this. Stretch goal: submit PR by the end of Jan. |
@morsssss Do you have a work in progress branch somewhere? I've implemented avif support in darktable using libavif. I can offer to do a code review ... |
Hi @cryptomilk ! Thanks for this offer. That would be quite helpful. In fact, as of today I've got encoding and decoding working. I need to write more tests, but I'll clean up my code and comments a bit and share this with you by Wednesday. |
@cryptomilk , I just submitted my work as a draft pull request. Thanks for your help here! |
With the adoption of AVIF by Firefox and Chromium based browsers (still in experimental phase), the newer incorporation of HEIF by Canon and Sony in their cameras and the newer support of both of them in modern software like ImageMagick, GIMP and Krita, `gd` haven't seen any endorsement for the formats up until this PR. Reading and writing is done by `libheif`, with functionality for chroma subsampling (for now `4:2:0`, `4:2:2` and `4:4:4`), quality (with new `200` for lossless) and compression (whether `HEVC` or `AV1`) selection. This was tested with `libheif` version `1.11.0` in my Solus machine. Also, fixes both #395 and #557.
Demand for AVIF support on the web is growing, as the word gets out about this new file format which allows higher-quality encoding at smaller sizes. Core contributors to major open-source CMSs are interested in auto-generating AVIF images! They've been simply waiting for support to appear in libgd. This PR aims to meet the growing demand, and to help bring smaller, more beautiful images to more of the web - to sites created by experienced developers and CMS users alike. This PR adds support by incorporating libavif in addition to the existing libheif support. It's generally felt that libavif has more complete support for the AVIF format. libavif is also used by the Chromium project and squoosh.app. In this PR, I've endeavored to incorporate the latest research into best practices for AVIF encoding - not just for default quantizer values, but also an algorithm for determining the number of horizontal tiles, vertical tiles, and threads. Fixes #557.
I know the support is still almost inexistant.... Just supported in Windows10 since May, and no browser supports it atm, as far as I know. (There is however a polyfill : https://github.com/Kagami/avif.js)
But the AVIF format was born earlier this year, and support will probably arrive soon everywhere (AOM initiative, from google, mozilla, apple, etc...)
The promise of this format is big, and it should - finally - be a real replacement for our current outdated formats (jpg, ..).
avif spec : https://aomediacodec.github.io/av1-avif/
libavif : https://github.com/AOMediaCodec/libavif
The text was updated successfully, but these errors were encountered: