Casvt / Kapowarr

Kapowarr is a software to build and manage a comic book library, fitting in the *arr suite of software.
https://casvt.github.io/Kapowarr/
GNU General Public License v3.0
348 stars 12 forks source link

Ability to convert image files #143

Open Casvt opened 3 months ago

Casvt commented 3 months ago

Is your feature request related to a problem? Please describe.

We can convert container files (zip and rar) to each other or extract to a folder. What we can't do is convert the image files inside (the container or folder) to a different format. E.g. jpg -> webp.

Describe the solution you'd like

You can already specify the container conversion preference. A second preference for image conversion should be available.

Additional context

First convert the container, then convert the files. This will most likely mean that we extract a container, zip up the folder into a different container, then extract it again, convert all image files inside, then zip up again. Ideally, it would convert the image files while converting the container too, but we'll have to see if that's possible.

The conversion of the file itself is shockingly easy.

Nadiar commented 3 months ago

I think I'd prefer changing the files to AVIF if possible, if we're going to convert them maybe it should start with adding avif as a supported type?

Casvt commented 3 months ago

Pillow supports loads of file formats

Strontium commented 2 months ago

This would be a great addition. Currently achieving this with a custom script. Could you consider adding image resizing at the same time? This can help reduce file sizes significantly for large scans. This could be done through a max vertical height setting, anything that exceeds is resized to a set value. Also may be good to allow changing encode settings to manage quality over file size.

Casvt commented 2 months ago

That should be seen as a separate feature, so please make an issue for that. Something like: "Transcoding image files"

azuravian commented 1 month ago

Assuming this is being done in python, I have a script that I've been using for a couple of years to do this. It does the following:

https://github.com/azuravian/cbz_jpg-to-webp