Closed liudongmiao closed 3 months ago
Thanks for the PR! Would be great if you can test a test assertion for WithAvifSpeed
at
https://github.com/cshum/imagor/blob/master/vips/option_test.go
Thanks for merge.
Before the next version release, this is currently available under the Docker build of develop branch:
https://github.com/cshum/imagor/pkgs/container/imagor/255863182?tag=develop
ghcr.io/cshum/imagor@sha256:cd5469eaf7541eee310e9dc9ca90490a931781673cbc8875ddea3a1fcc0e9081
This PR try to add avif speed for imagor.
It's said imagor doesn't support avif speed, while similar image cdns like thumbor and imgproxy do support. In a test with wrk, imagor is faster than thumbor and imgproxy, and with a smallest Stdev.
Please note, libvips has changed to parameter from
speed
toeffort
in 2021, however,speed
still works. ref 1: https://www.libvips.org/API/current/VipsForeignSave.html#vips-heifsave-buffer ref 2: https://github.com/libvips/libvips/blob/master/libvips/foreign/heifsave.c (libvips would converteffort
tospeed
again forheif
's api. :-)BTW,
heif
support differentspeed
for differentcodec
: aom 0-9, https://github.com/strukturag/libheif/blob/master/libheif/plugins/encoder_aom.cc rav1e 0-10, https://github.com/strukturag/libheif/blob/master/libheif/plugins/encoder_rav1e.cc svt 0-13, https://github.com/strukturag/libheif/blob/master/libheif/plugins/encoder_svt.cc