Set of my GIMP plugins to simplify life or just to play around!! 😆 😀 These plugins are written using Script-Fu and Python-Fu (or GIMP-Python).
Script-Fu scripts (*.scm
files) should be easy to install and get working on all operating systems. Similarly, Python-Fu scripts can be installed by copying *.py
files to GIMP plug-ins directory. However Python-Fu scripts may be bit challeging to get working on Windows OS, as it requires working installation of python. Step to install Python-Fu on window can be found on a few websites, however I have not tested it: gimpusers.com, gimpbook.com, reddit.com.
Linux users can simple execute the included deploy-gimp-plugins.sh
script to install all the scripts in their home directory.
-
otsu-threshold.scm - Implements Otsu's thresholding method in Script-Fu to binarize the current image. On installation, this appears in menu: Filters/Scanned Document/Otsu threshold - binarize Image. This has similar effect as the "Auto" button found in menu Colors/Threshold. It was implemented to expose the auto-thresholding functionality to the Procedure Database so that it can be used in other scripts/plugins. In addition,
otsu-threshold.scm
also allows controling bin-width for internal histogram estimation and converts image to indexed image with 2-color mono-palette. -
optimize-scanned-document-batch.py - Python-Fu script for batch processing of scanned documents (not natural images) to achieve substantially smaller file-sizes (~175 times smaller in typical use) without loosing relevant content. This is desirable for archiving of lots of paper documents electronically. On installation, this script appears in menu: Filters/Scanned Document/Optimize document - Batch. It is a wrapper around
otsu-threshold.scm
and adds few more features for batch processing (see screenshot on right; click to enlarge). Output images are saved in tiff format with CCITT Group 4 compression (png format is used when Number-of-colors is more than 2). Default values should work reasonably well with scanned image with 300 DPI (for best results disable all image correcting features in scanner software specially Unsharp Mask). For images with very little content (mostly blank), contrast stretching should be changed to "Min-Max". Blurring can also be applied for noisy input images. Typical example: I get ~175 times reduction in size with this plugin (from 368.7 MB to 2.1 MB for 36 documents scanned to png format).