View Single Post
Old 11-25-2021, 02:29 PM   #1
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
[Plugin] PNGOptimizer - Lossless/lossy image optimization

Released: November 26, 2021
Current Version: "0.1.2"

This plugin uses optipng for lossless optimization and pngquant for lossy optimization of PNG files.

Disclaimer: Since this plugin will replace the images in your ebook with optimized images, you might want to save your ePub or create a checkpoint before running this plugin.

Credits

BeckyEbook created the plugin icon.

System requirements

This plugin requires at least Sigil 0.9.8. If you uncheck the Use Bundled Python option, you'll also need to install Python 3. Linux users will also need to install optipng (Debian Arch) and pngquant, (Debian, Arch).

Installation

1. Select Manage Plugins from the Plugins menu and enable the Use Bundled Python option, if it isn't already enabled (or grayed out).
2. Click Add Plugin and select PNGOptimizer_v0.1.2.zip. This will install the plugin, which you can select via Plugins > Edit > PNGOptimizer.

Settings

To turn on lossy optimization, edit PNGOptimizer.json and change the lossless value to false:

Code:
  "lossless": false,
You can also define minimum/maximum quality settings via the quality value:

Code:
  "quality": "0-100",
To display the folder that contains PNGOptimizer.json select Edit > Preferences > Open Preferences Location. Then double-click plugins_prefs and PNGOptimizer.
Windows users can also press WIN+R, paste %localappdata%\sigil-ebook\sigil\plugins_prefs\PNGOptimizer into the Run dialog box and hit Enter.

License: GNU General Public License v3 (GPL-3)
Attached Files
File Type: zip PNGOptimizer_v0.1.2.zip (889.2 KB, 1586 views)

Last edited by Doitsu; 11-26-2021 at 02:30 PM.
Doitsu is offline   Reply With Quote