hopfer is a Python-based GUI application that implements a wide range of halftoning algorithms from scratch primarily meant for printmaking purposes.
hopfer is a digital halftoning tool built with Qt6 for the GUI, while leveraging NumPy and Numba for high-performance halftoning.
Originally developed as part of my PhD research on digital halftoning for analog printmaking techniques, hopfer is designed primarily for this purpose. While it may have applications in image compression and visual effects, these are not its main focus.
At present, hopfer does not support palette-based halftoning or multi-level dithering, and there are no plans to add these features.
- A variety of halftoning algorithms, including:
- Fixed threshold
- Local thresholds
- Random dithering
- Bayer dithering
- Clustered dot halftoning
- Error diffusion dithering
- Variable error diffusion dithering
- Basic non-destructive image editing tools, such as:
- Rotation
- Brightness & contrast
- Gaussian blurring
- Denoising
- Sharpening
- Support for a wide range of image formats, including:
- PNG, JPEG, BMP, TIFF, WebP and more (anything supported by OpenCV)
Not sure yet.
git clone https://github.com/crunchpaste/hopfercd hopferpip install -r requirements.txtpython src/hopfer.pyDespite depending on numba you can still compile hopfer to a single static binary using nuitka. To do so:
python src/algorithm_compiler.pypip install nuitkanuitka --standalone --onefile --include-data-dir=res=res --nofollow-import-to=numba --enable-plugins=pyside6 src/hopfer.pyThe project relies on the following awesome open-source libraries. I extend my thanks to their maintainers and contributors!
-
numpy: GitHub LinkThe fundamental package for scientific computing with Python.
-
Numba: GitHub LinkA Just-In-Time compiler for numerical functions in Python.
-
opencv-python: GitHub LinkUsed for image processing and encoding/decoding.
-
requests: GitHub LinkA simple, yet elegant, HTTP library.
-
PySide6: Documentation LinkThe official Python bindings for the Qt framework, used to build the GUI.
-
PyQt-Frameless-Window: GitHub LinkEnables the creation of custom frameless windows.
-
superqt: GitHub Link"missing" widgets and components for PyQt/PySide
-
makeself: GitHub LinkUsed for creating the Linux installer.
-
Nuitka: WebsiteUsed for compiling the application into an executable.
-
platformdirs: GitHub LinkUsed for determining standard, cross-platform directories for storing image and configuration data.
-
setproctitle: GitHub LinkAllows a process to change its title.
Enjoy halftoning!
