Closed Phreak87 closed 4 years ago
It's not going to happen any time soon. leptonica is a library for images, not video, and each additional format supported comes with a significant cost in complexity and development effort.
If av1 comes out with a format for single images that has advantages over png, jpeg, tiff and webp, and furthermore gets significant traction (e.g.., supported by all major browsers), this decision can be revisited.
Dan,
AV1 is a video format, AVIF is an image format.
Just to let you know the current support status by major browsers:
https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)
No pressure from me to support it in Leptonica.
Thank you. It's early days, and leptonica only supports static images (plus a very weak support for animated webp).
Dan
See also https://github.com/tesseract-ocr/tesseract/issues/2930 where another new image format (HEIC) is suggested.
I'll just mention yet another interesting new image format - JPEG XL. Google is involved in creating this format.
https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_image_codecs
https://github.com/google/brunsli
my main interest on this topic is the much higher compression rate compared to webp. i use leptonica in a webserver which compresses the images to webp to speed up the page loading. higer compression would be awesome! animation on this images is in this case not relevant to me.
If this happens i like to provide also a new leptonica c# wrapper interface on my GH-Page. i hope this topic will be revisited if the format becomes traction.
@amitdo
Thank you for bringing jpeg-xl into the discussion. It has come along faster than I realized. From the comparison paper, it is likely to be standardized in a year or so. It has a clean migration path from jpeg, much better quality at the same bit rate, and fast encoding/decoding. It's also being developed by some very smart people, and unlike the other compression formats mentioned above, it has no known patent issues.
An update about jpeg-xl:
https://www.phoronix.com/news/Chrome-Dropping-JPEG-XL-Reasons
What a difference 2 years makes! From the hot new thing -- the perfect upgrade from jpeg -- to a not-to-be-supported test bed for experimenting on codecs. Good thing I waited :-)
Google has, IMHO, been surprisingly poor in following up on new image compression initiatives. WebP is a very nicely implemented Google codec for still images, derived from a video format. The wavelet encoding results in much fewer visible artifacts from edges than with the DCT compression of jpeg. And Google also implemented an animated version, so I included a shim in leptonica to generate an animated WebP from a pixa. And yet ... Google's gmail, the second most widely used mail program in the world, doesn't support animated WebP; if you put one in, it just shows you the first image. https://www.caniemail.com/features/image-webp/ Note that as of 2020, both Apple and Microsoft fully support WebP, including animation. Google could also have used a version of the original video codec for animated WebP. Either would have provided a good alternative within gmail to gif: in speed, compression rate and image quality. But they punted!
Hey,
Is it possible to implement the brandnew avif Image Format? This would ne great.
Thx