pashifika / comic-auto-resize

manga compressed file auto-resize tool
Apache License 2.0
5 stars 1 forks source link

Does not work on .rar #2

Closed timothevs closed 2 years ago

timothevs commented 2 years ago

No matter what rar file I may try

[FATAL] unknown encoder

This is on macOS 12.2 using the latest 1.1.0

Using debug I see that the rar file is decoded, and the images are all processed. It even creates a 0 byte size file _resize.rar, but fails at the last step.

[DEBUG] path: B128.jpg  resize to: width=1440 height=2177
[DEBUG] path: B129.jpg  resize to: width=1440 height=2176
[FATAL] unknown encoder
pashifika commented 2 years ago

please try the ratio option.

timothevs commented 2 years ago

Not sure if it is ratio related.

I renamed the .cbr and changed the file extension to .zip. Tried it with the tool, and it converted it just fine. It will not work for some reason with .rar or .cbr

Additionally if the files inside the archive have any special characters like &, and ., the conversion fails immediately.

pashifika commented 2 years ago

please try the out option, -o, --out: set output file path (default is add suffix '_resize' to file name). and set the file extension to the correct ZIP.

timothevs commented 2 years ago

Yep this works ./comic-auto-resize --out=abc.zip Draupadi.cbr , but it doesn't when you try --out=abc.cbz

pashifika commented 2 years ago

compressor.CreateArchiverFile is check to output file name extension.