View Single Post
Old 06-18-2024, 08:38 AM   #9
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,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Batch compression (lossy/lossless) for images in selected books

A combination of Editor Chains and Action Chains lets you perform lossy compression on multiple books.

In Editor Chains, there is a an action called "Compress Images", that enables you to automate this process. You can use the Action Chains to run this for multiple books. (chain in first attachment).

If you want to use an external tool to for lossy compression, e.g. ImageMagick, which can help convert png to jpg, you can use the Run Command action which will iterate over all images in an epub. See this post and screenshots for more details. (chain in second attachment). Note however, that you might need to edit the chain to configure the path to ImageMagick on your system.

To import the attached chains: Action Chains > Add/Modify chains > right click the chains table > import > browse to the zip file.

Note: I have found the ImageMagick approach to be much faster with lossy compression compared to the first approach that uses the editor's "Compress Images". Test with both and see which is more satisfactory.
Attached Files
File Type: zip lossy1.zip (558 Bytes, 360 views)
File Type: zip lossy2.zip (714 Bytes, 435 views)

Last edited by capink; 08-13-2025 at 11:35 AM.
capink is offline   Reply With Quote