View Single Post
Old 01-17-2023, 11:03 PM   #3
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,200
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Calibre command line ebook-polish only allows for lossless compression of images per the documentation.

If you insist on lossy compression, Editor Chains plugin allows you to use calibre's image compression functionality (among many other editor functions) from the command line:
  • Install the plugin from calibre (Calibre main library > preferences > get plugins).
  • Open the calibre editor, and then import the chain attached below (Editor > plugins menu > Editor Chains > add chains > right click > import chain).
  • From the command line you can type this command to compress images in your ebook (epub and azw3 formats supported):

    Code:
    calibre-debug -r "Editor Chains" "Compress Images" path_to_input.epub path_to_output.epub

Note: You can configure the compression ratio by modifying the settings of the chain.
Attached Files
File Type: zip compress_images.zip (347 Bytes, 114 views)
capink is offline   Reply With Quote