kcc icon indicating copy to clipboard operation
kcc copied to clipboard

[Feature Request] Support for .avif image files

Open PoisonPyte opened this issue 1 year ago • 3 comments

All my comics are formatted as AVIF inside a CBZ with metadata. Currently, I have to extract the files and convert them to jpg using another program, before recompressing them back into a CBZ. Could you add support for AVIF conversion inside the program please? Alternatively if EPUB natively supports AVIF then no conversion is needed, just a way for the program to recognize it.

I can provide a sample file if needed.

PoisonPyte avatar Jan 06 '25 14:01 PoisonPyte

You don't need to recompress to cbz. Kcc accepts a folder of images with the comic info.xml inside.

This will have to wait until pillow adds avif support.

axu2 avatar Jan 06 '25 20:01 axu2

Thanks for tell me, that saves the hassle of recompressing everything.

Could this unofficial plugin be used until its officially supported? https://github.com/fdintino/pillow-avif-plugin

PoisonPyte avatar Jan 07 '25 08:01 PoisonPyte

pillow 11.2.1 has been add avif support. https://pillow.readthedocs.io/en/stable/releasenotes/11.2.1.html#reading-and-writing-avif-images

yaqinking avatar May 31 '25 13:05 yaqinking

Might be as easy as changing this line:

https://github.com/ciromattia/kcc/blob/cb0520dcab24a88a8311872b6b5cf5d08442c815/kindlecomicconverter/shared.py#L57

@PoisonPyte @yaqinking

axu2 avatar Jun 17 '25 20:06 axu2

Tried use pillow 11.2.1 but raised exception, it seems not ready for avif support.

yaqinking avatar Jun 19 '25 08:06 yaqinking

Sounds like you need to

Pillow can now read and write AVIF images when built from source with libavif 1.0.0 or later.

axu2 avatar Jun 25 '25 05:06 axu2

Looks like it's ready in 11.3.0 https://pillow.readthedocs.io/en/stable/releasenotes/11.3.0.html#avif-support-in-wheels

axu2 avatar Jul 07 '25 08:07 axu2

@PoisonPyte @yaqinking I've added AVIF input support in 8.0.3

If you feel generous, feel free to donate on ko-fi! https://ko-fi.com/eink_dude

axu2 avatar Jul 09 '25 18:07 axu2