avif as a replacement for comic book formats .cbz #2640
Replies: 1 comment
-
Thank you for your interest in AVIF.
Regarding using AVIF as a good replacement for .cbz for its lossy compression capabilities: Regarding using AVIF as a good replacement for .cbz because it would all fit in a single file: I would also suggest WebP for its good compression performance and tooling support. I tried multiple codecs on four scanned comics pages 1, 2, 3, 4, from the web-images dataset: For the same source image and the same distortion (SSIMULACRA2 ±1.0%), How to reproducewget https://raw.githubusercontent.com/google-research-datasets/web-images/7d8a25e8dbb82069c44e7b1e40d9e1e23a9b1f36/images/fight_comics_0.png
wget https://raw.githubusercontent.com/google-research-datasets/web-images/7d8a25e8dbb82069c44e7b1e40d9e1e23a9b1f36/images/fight_comics_1.png
wget https://raw.githubusercontent.com/google-research-datasets/web-images/7d8a25e8dbb82069c44e7b1e40d9e1e23a9b1f36/images/jumbo_comics_0.png
wget https://raw.githubusercontent.com/google-research-datasets/web-images/7d8a25e8dbb82069c44e7b1e40d9e1e23a9b1f36/images/jumbo_comics_1.png
git clone -b v0.5.1 --depth 1 https://github.com/webmproject/codec-compare-gen.git
cd codec-compare-gen
./deps.sh
cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++
cmake --build build --parallel
mkdir ../json
mkdir ../encoded
build/ccgen \
--codec webp 420 0 --codec webp 420 1 --codec webp 420 2 --codec webp 420 3 --codec webp 420 4 --codec webp 420 5 --codec webp 420 6 \
--codec avif 420 0 --codec avif 420 1 --codec avif 420 2 --codec avif 420 3 --codec avif 420 4 --codec avif 420 5 --codec avif 420 6 --codec avif 420 7 --codec avif 420 8 --codec avif 420 9 \
--codec avif 444 0 --codec avif 444 1 --codec avif 444 2 --codec avif 444 3 --codec avif 444 4 --codec avif 444 5 --codec avif 444 6 --codec avif 444 7 --codec avif 444 8 --codec avif 444 9 \
--codec jpegxl 444 1 --codec jpegxl 444 2 --codec jpegxl 444 3 --codec jpegxl 444 4 --codec jpegxl 444 5 --codec jpegxl 444 6 --codec jpegxl 444 7 --codec jpegxl 444 8 --codec jpegxl 444 9 --codec jpegxl 444 10 \
--codec jpegmoz 444 --codec jpegmoz 420 \
--lossy --threads 127 --results_folder ../json/ --encoded_folder ../encoded/ --metric_binary_folder third_party/ \
-- ../*.png
git clone -b v0.5.4 --depth 1 https://github.com/webmproject/codec-compare.git
cd codec-compare
# Modify default_batches.json to point to the JSON files generated by ccgen in the "json" folder
npm i
npm run dev The tested corpus is tiny but it gives some idea of what to expect. |
Beta Was this translation helpful? Give feedback.
-
See https://en.wikipedia.org/wiki/Comic_book_archive. A comic book archive is basically a bunch of .jpg or .png zipped together.
Since avif already supports multi-frame images, would it be a good replacement for .cbz?
i.e: How efficient/optimized would avif be for this task? (e.g: say a comic with 100 pages of high quality scans)
related jpegxl discussion: libjxl/libjxl#4119
Beta Was this translation helpful? Give feedback.
All reactions