Commit graph

1181 commits

Author SHA1 Message Date
Robin Whittleton
6b3863ff18 Add cavif LICENSE file as required 2022-09-18 22:08:19 +02:00
Robin Whittleton
71b675331a Fix AVIF images in iOS16 (and 8+ times speedup of AVIF generation)
iOS16 upholds AVIF standards more strictly than other renderers, which means that the current AVIF images on SE are broken. A fix for generation bug has been added to go-avif (https://github.com/Kagami/go-avif/pull/17) but we can do better.

This PR switches out the AVIF generation to cavif (https://github.com/kornelski/cavif-rs) which not only doesn’t suffer from the iOS16 but drops generation time by more than 8 times. For example, here’s a set of three timed runs in both go-avif and cavif on the title card of https://standardebooks.org/ebooks/jonathan-dymond/an-inquiry-into-the-accordancy-of-war-with-the-principles-of-christianity:

```
root@f58fb0beac90:/standardebooks.org/web/scripts# time ./go-avif -e "illustration.jpg" -o "illustration-go-1.avif" --best

real	0m31.191s
user	1m39.113s
sys	0m1.662s
root@f58fb0beac90:/standardebooks.org/web/scripts# time ./go-avif -e "illustration.jpg" -o "illustration-go-2.avif" --best

real	0m33.097s
user	1m49.846s
sys	0m0.831s
root@f58fb0beac90:/standardebooks.org/web/scripts# time ./go-avif -e "illustration.jpg" -o "illustration-go-3.avif" --best

real	0m36.963s
user	2m4.235s
sys	0m0.711s

root@f58fb0beac90:/standardebooks.org/web/scripts# time ./cavif --quality 50 "illustration.jpg" -o "illustration-cavif-1.avif"
illustration-cavif-1.avif: 98KB (96840B color, 0B alpha, 242B HEIF)

real	0m4.017s
user	0m11.600s
sys	0m0.051s
root@f58fb0beac90:/standardebooks.org/web/scripts# time ./cavif --quality 50 "illustration.jpg" -o "illustration-cavif-2.avif"
illustration-cavif-2.avif: 98KB (96840B color, 0B alpha, 242B HEIF)

real	0m4.083s
user	0m11.857s
sys	0m0.091s
root@f58fb0beac90:/standardebooks.org/web/scripts# time ./cavif --quality 50 "illustration.jpg" -o "illustration-cavif-3.avif"
illustration-cavif-3.avif: 98KB (96840B color, 0B alpha, 242B HEIF)

real	0m4.237s
user	0m12.339s
sys	0m0.093s
```

The executable has been generated via cargo, and has the following qualities:

```
root@f58fb0beac90:/standardebooks.org/web/scripts# file cavif
cavif: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f972071996c58b7a855d04e4c5804f4a3d94f575, for GNU/Linux 3.2.0, with debug_info, not stripped
```

I’m not sure how cavif’s quality 50 matches go-avif’s best flag, but they produce similar file sizes and similar visual quality.

There is a slight different in apparent colour space. If this is an issue there are tweaks, but according to the documentation it makes files larger so should be avoided. Given that the titlecards will matches the covers I see no reason to go down that path.
2022-09-18 22:01:26 +02:00
Alex Cabal
5309b939ea Update wanted ebooks list 2022-09-10 11:07:17 -05:00
Alex Cabal
ecaa3f0699 Add Weijia Cheng to masthead 2022-09-08 16:31:43 -05:00
Alex Cabal
048949f21f Update wanted ebooks list 2022-09-08 16:24:18 -05:00
Alex Cabal
e3889f2824 Update wanted ebooks list 2022-09-06 15:55:40 -05:00
Alex Cabal
19b5aaab27 Update wanted ebooks list 2022-09-06 09:51:52 -05:00
Alex Cabal
e61d267e49 Update wanted ebooks list 2022-09-04 20:14:37 -05:00
Alex Cabal
1336420678 Add link to Decline and Fall 2022-09-04 19:44:32 -05:00
Alex Cabal
a574a78c37 Add item to Kindle FAQ 2022-09-03 18:33:40 -05:00
Alex Cabal
f9b1469c0f Update wanted ebooks list 2022-09-02 09:13:52 -05:00
Alex Cabal
77443a16df Update wanted ebooks list 2022-09-01 15:49:53 -05:00
Lukas Bystricky
94e475f809 Add works by John Ruskin 2022-09-01 15:12:07 -05:00
Alex Cabal
5f473f4bc2 Tweak newsletter subscriber count query in donations page 2022-09-01 13:35:52 -05:00
Alex Cabal
40c5fdb3e3 Update sponsor information 2022-09-01 11:08:18 -05:00
Alex Cabal
0907dacae1 Tweak anonymous patron count SQL 2022-09-01 10:19:37 -05:00
Alex Cabal
64a8ccb082 Tweak wrapping in manual CSS 2022-08-28 20:03:56 -05:00
Alex Cabal
7ccdcd020e Update wanted ebooks list 2022-08-28 16:18:54 -05:00
Alex Cabal
4eca5c71b2 Update wanted ebooks list 2022-08-25 15:54:50 -05:00
Alex Cabal
c5205ee87a Update wanted ebooks list 2022-08-24 10:11:26 -05:00
Anthony J. Bentley
eaec62f722 Update wanted ebooks list: Two Years Before the Mast 2022-08-24 09:44:54 -05:00
Anthony J. Bentley
f9665ee339 Use dashes, not hyphens 2022-08-23 09:39:42 -05:00
Alex Cabal
f53a9708a4 Update readme with correct URLs 2022-08-22 20:41:35 -05:00
Alex Cabal
7465145b33 Note patron anonymous status in notification email 2022-08-21 13:48:25 -05:00
Alex Cabal
a370651a62 Update wanted ebooks list 2022-08-20 13:48:46 -05:00
Alex Cabal
35565d90f6 Redirect ended polls to the results page 2022-08-20 13:18:42 -05:00
Alex Cabal
7201081aed Update wanted ebooks list 2022-08-19 10:04:15 -05:00
Alex Cabal
a2902ebcb8 Update wanted ebooks list 2022-08-17 15:51:03 -05:00
Alex Cabal
bdc4e7e75b Update wanted ebooks list 2022-08-16 11:43:31 -05:00
Alex Cabal
46251e8801 Update wanted ebooks list 2022-08-15 10:55:26 -05:00
Alex Cabal
3f250047bc Update wanted ebooks list 2022-08-15 09:42:32 -05:00
Alex Cabal
a0db9799f4 Add ebook redirect 2022-08-14 11:02:59 -05:00
Alex Cabal
1c88ab1ecf Update wanted ebooks list 2022-08-13 20:42:25 -05:00
Alex Cabal
9ccf33f578 Correctly capitalize title tag in poll results 2022-08-13 19:23:57 -05:00
Alex Cabal
88ded6b7e6 Update wanted ebooks list 2022-08-13 12:13:06 -05:00
Alex Cabal
1ded9881d6 Lowercase am/pm in some instances 2022-08-13 10:57:46 -05:00
Weijia Cheng
bd7e60aca4 Tweak Epictetus suggestion 2022-08-10 11:49:19 -05:00
Alex Cabal
682f6b30cc Update wanted ebooks list 2022-08-10 09:46:43 -05:00
Alex Cabal
42b92bab28 Update dockerfile 2022-08-09 09:44:15 -05:00
Alex Cabal
d220ca05f5 Tweak wording in donation progress bar 2022-08-06 14:27:03 -05:00
Alex Cabal
ed0b996106 Update wanted ebook list 2022-08-03 13:31:21 -05:00
Alex Cabal
24146abc26 Update wanted ebook list 2022-08-02 08:47:58 -05:00
Alex Cabal
7e16e70229 Prevent Patrons Circle name from breaking across column border 2022-08-01 11:53:43 -05:00
Alex Cabal
68218c3482 Update wanted ebook list 2022-07-31 18:31:21 -05:00
Szymon Szott
78a491c4c3 Remove In Search of the Castaways from wanted list
It has already been produced: https://standardebooks.org/ebooks/jules-verne/in-search-of-the-castaways/j-b-lippincott-co
2022-07-31 18:29:33 -05:00
Alex Cabal
98850bd475 Fix possible infinite loop when building ebook carousel 2022-07-28 13:51:35 -05:00
Alex Cabal
e6f74449a2 Fix disabling animations when user requests reduced motion 2022-07-28 13:47:00 -05:00
Alex Cabal
75ed29db63 Update wanted ebook list 2022-07-27 14:30:23 -05:00
Alex Cabal
c2dabfbe2d Add comment for clarity 2022-07-27 11:30:56 -05:00
Weijia Cheng
f2ffacdff8 Restrict Internet Archive source to scans only 2022-07-27 11:29:12 -05:00