Dapbler / cbr2cbz

Python script that converts compressed CBR and CBZ comic archives to stored CBZ. Many options.
GNU General Public License v3.0
23 stars 4 forks source link

Enhancement: shrink option to recode huge archies to lower quality #3

Closed Dapbler closed 6 years ago

Dapbler commented 6 years ago

Phones and tablets with small screens really don't need great resolution and image quality and often don't have a lot of storage. JPEG module is gone in Py3.x and PIL says it's 2.x only. Imagemagick is fine on *nix.

Maybe check each page against a max width/height and size (KB), and convert if outside of boundaries.

Dapbler commented 6 years ago

Something like : identify -precision 16 -format "%b %e %m %W %H" infile size checks, max size of 700KB x aspect ratio? convert infile -quality 40 -resize "x1500>" outfile if smaller replace

Dapbler commented 6 years ago

Done. Pretty aggressive conversion, usually shrinking by 50-90% while still looking okay.

Remember this is not something to do on the archival copy/original purchased download. This compresison loses image quality, so it's just for the copy placed on a low storage device (phone, tablet).