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 AVIF support for resize_image() function #2780

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

iWangJiaxiang
Copy link

The work for adding AVIF support for resize_image() has been finished, with pure rust crate.

With this feature, user may convert their images into avif format and the size will be reduced significantly.

However, the speed is slow in the developing env of GITHUB Code Space. I will take further tests on my machine.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@iWangJiaxiang
Copy link
Author

Is it necessary to add encoding speed arguement for resize_image()? @Keats

To compare time consumed to resize_image(), I tried command time zola build with deferrent encoding speed within my theme repo zola-theme-jiaxiang.wang, which has 16 images to be processed.

speed real time user time sys time
1 5m54.865s 9m50.317s 0m0.821s
5 1m33.157s 2m30.512s 0m0.508s
6 1m26.289s 2m36.678s 0m0.442s
10 0m42.102s 1m14.762s 0m0.322s

The results tell the speed make significant sense for encoding.

Accoding to https://www.reddit.com/r/AV1/comments/qie51c/why_when_encoding_avif_images_with_avifenc_on/ , the speed 1-6 is good quality encoder mode and 7-10 is realtime encoder mode. Should we set 10 as default speed?

@iWangJiaxiang iWangJiaxiang marked this pull request as ready for review January 22, 2025 06:34
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.

1 participant