imazen / imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
https://docs.imageflow.io/
GNU Affero General Public License v3.0
4.14k stars 141 forks source link

Support AVIF #508

Open GNURub opened 3 years ago

GNURub commented 3 years ago

I'd like to submit a proposal for a future feature to consider.

https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4

Format comparison: https://jakearchibald.com/2020/avif-has-landed/

kornelski commented 3 years ago

I've written pure-rust encoder: https://lib.rs/crates/cavif

And a decoder that uses libaom: https://lib.rs/crates/aom-decode

lilith commented 3 years ago

What's the binary size of the decoder and encoder?

On Fri, Sep 11, 2020, 8:03 AM Kornel notifications@github.com wrote:

I've written pure-rust encoder: https://lib.rs/crates/cavif

And a decoder that uses libaom: https://lib.rs/crates/aom-decode

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/508#issuecomment-691114238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH4PTSHDMBZVB4EMXD3SFIU4JANCNFSM4RHKIB3A .

kornelski commented 3 years ago

cavif is pretty lean. I've replaced libavif with basically one big struct. It's 100% pure Rust. Includes rav1e. Executable is 1.7MB, gzips to 500KB.

aom-decode is fatter — 7MB — since it pulls in all of libaom. I haven't looked at trimming it down. Maybe dav1d would be smaller, but it needs meson and ninja to build, and I'm not a fan.

lilith commented 3 years ago

I'm hesitant to triple the size of Imageflow to add avif support.

On Fri, Sep 11, 2020, 1:44 PM Kornel notifications@github.com wrote:

cavif is pretty lean. I've replaced libavif with basically one big struct. It's 100% pure Rust. Includes rav1e. Executable is 1.7MB, gzips to 500KB.

aom-decode is fatter — 7MB — since it pulls in all of libaom. I haven't looked at trimming it down. Maybe dav1d would be smaller, but it needs meson and ninja to build, and I'm not a fan.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/508#issuecomment-691280163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LHZ67D23RYDNUWJTAZLSFJ4YDANCNFSM4RHKIB3A .

kornelski commented 3 years ago

I get that decoding brings in large dependencies, but you could support encoding only. Encoding can be done in pure Rust and rav1e is pretty lean. I've released my encoder as a library: https://docs.rs/ravif

lilith commented 3 years ago

I will consider it then.

On Mon, Sep 14, 2020, 6:17 AM Kornel notifications@github.com wrote:

I get that decoding brings in large dependencies, but you could support encoding only. Encoding can be done in pure Rust and rav1e is pretty lean. I've released my encoder as a library: https://docs.rs/ravif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/508#issuecomment-692014738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH2FHVXFOKTY2JYD37LSFYCWFANCNFSM4RHKIB3A .

iJungleboy commented 2 years ago

Any progress on this? I would be very interested since AVIF support is at around 70% https://caniuse.com/avif and I believe it's really good.

lilith commented 2 years ago

I'm really hoping iOS adds support for AVIF. Safari gets much of its speed by delegating image processing to the OS and its incredible hardware integration, so stuff lands much more slowly there.

I would like to add this, but I have a lot going on right now, so I can't offer a timeline.

On Thu, Jan 6, 2022 at 12:26 AM iJungleboy @.***> wrote:

Any progress on this? I would be very interested since AVIF support is at around 70% https://caniuse.com/avif and I believe it's really good.

— Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/508#issuecomment-1006341442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH4CO3E3ZHH3RCF4MFDUUU7ZPANCNFSM4RHKIB3A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

iJungleboy commented 2 years ago

No problem - and thanks for your more-than-amazing work!

stevetayloruk commented 1 year ago

Support for this would be great with Safari soon to be supporting. https://www.coywolf.news/webmaster/safari-now-supports-avif-in-macos-ventura-and-ios-16/

zz commented 1 year ago

@lilith AVIF support now?

lilith commented 1 year ago

It's planned. It will be slow, though, no getting around that.

On Wed, Nov 23, 2022, 11:54 PM ZZ @.***> wrote:

@lilith https://github.com/lilith AVIF support now?

— Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/508#issuecomment-1326028316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LH543LGRFUSJHSHJBYLWJ4GJVANCNFSM4RHKIB3A . You are receiving this because you were mentioned.Message ID: @.***>