imageflow icon indicating copy to clipboard operation
imageflow copied to clipboard

Support AVIF

Open GNURub opened this issue 4 years ago • 18 comments

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/

GNURub avatar Sep 11 '20 12:09 GNURub

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

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

kornelski avatar Sep 11 '20 14:09 kornelski

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

On Fri, Sep 11, 2020, 8:03 AM Kornel [email protected] 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 .

lilith avatar Sep 11 '20 19:09 lilith

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.

kornelski avatar Sep 11 '20 19:09 kornelski

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

On Fri, Sep 11, 2020, 1:44 PM Kornel [email protected] 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 .

lilith avatar Sep 12 '20 21:09 lilith

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

kornelski avatar Sep 14 '20 12:09 kornelski

I will consider it then.

On Mon, Sep 14, 2020, 6:17 AM Kornel [email protected] 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 .

lilith avatar Sep 14 '20 16:09 lilith

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.

iJungleboy avatar Jan 06 '22 07:01 iJungleboy

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: @.***>

lilith avatar Jan 06 '22 20:01 lilith

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

iJungleboy avatar Jan 07 '22 09:01 iJungleboy

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/

stevetayloruk avatar Aug 24 '22 08:08 stevetayloruk

@lilith AVIF support now?

zz avatar Nov 24 '22 06:11 zz

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: @.***>

lilith avatar Nov 24 '22 06:11 lilith