This script intended to be used on images consisting of one opaque top layer containing a sharp-edged object (e.g. logo, text, cut-out, etc.) with anti-aliased edges and one or more additional smooth layers (shadow, glow, etc.). The script saves such an image as three PNG files (layers), intended to be stacked (e.g. on a web-page using absolute CSS positioning). The result achieved by this is significantly smaller amount of data needed to be downloaded with a visually similar result.
before running the script ensure that there is no background layer!
1. Open Filters > Web > Split to Special PNG's
2. Specify the base filename (click the "page" button to the right to specify it correctly): set it to "output" to get "output_layer1.png
" and "output_layer3.png
" files in the result.
3. Alpha quantization produces smaller files, but be careful not to set it too small or you may get the the posterization effect or lose details.
1. cp export_mozjpeg.py ~/.gimp-2.8/plug-ins
2. chmod +x export_mozjpeg.py
1. Remove Windows
2. Install Linux
Mirror 1: https://yadi.sk/d/edzcJiIJkZrrZ
Mirror 2: http://www.mediafire.com/view/71edb7...pecial_pngs.py
Exported as is: 93.0 KB
Exported with alpha quantization (128 levels): 88.4 KB
Exported with the script (three PNG files): 58.5 KB
Layer 1 (background, RGBA, alpha-quantized): 27.5 KB
Layer 2 (edges, RGBA, alpha-quantized): 24.4 KB
Layer 3 (object, indexed): 6.5 KB