『EN』 | RU |
---|
Programs for scaling up small low-color images like icons and game sprites.
Apparently useful for scaling up grey text scans with low resolution before OCR, to improve OCR quality.
Note
For single file processing PNG, PGM and PPM formats are supported. Batch processing of folders and subfolders is supported. Currently only PNG format is supported for batch processing to avoid batch confusions due to different PNM subversions.
Currently Scale2x (aka AdvMAME2x) and Scale3x (aka AdvMAME3x) are implemented.
-
Scale2x.py - single image rescale, uses Scale2x scaling, equipped with simple GUI for opening and saving PNG files, but can also be run from command line.
Usage:
python Scale2x.py - starts GUI for selecting source and result
python Scale2x.py source.png - rescales source.png and overwrites source.png
python Scale2x.py source.png result.png - rescales source.png and writes result.png -
batchScale2x.py - batch rescaling of all PNG files within chosen directory, recursively, using Scale2x algorithm. Attention: Source images are replaced, no backup - no mercy.
-
Scale3x.py - single image rescale, uses Scale3x scaling, equipped with simple GUI for opening and saving PNG files, but can also be run from command line.
Usage:
python Scale3x.py - starts GUI for selecting source and result
python Scale3x.py source.png - rescales source.png and overwrites source.png
python Scale3x.py source.png result.png - rescales source.png and writes result.png -
batchScale3x.py - batch rescaling of all PNG files within chosen directory, recursively, using Scale3x algorithm. Attention: Source images are replaced, no backup - no mercy.
Note
Batch processing programs in this version use async multiprocessing, drastically reducing processing time but loading CPU at 100% and rendering GUI almost unresponsive.
- PyPNG. Copy included into current ScaleNx distribution.
- PyPNM. Copy included into current ScaleNx distribution.
- Tkinter, multiprocessing. Included into standard CPython distribution.
Note
Programs are written entirely on Python, using image representation as list of lists of lists. While this representation is logical for human understanding, Python processing of this is slow. Moreover, programs contain lists reshaping for PNG I/O purposes, also performed using Python native means only. As a result, programs are slow but quite compatible with anything capable of running Python, and don't require large external packages causing version conflicts.
-
Scale2x origin by Andrea Mazzoleni.
-
Pixel-art scaling algorithms review at Wikipedia.
-
ScaleNx at PyPI - install ScaleNx core library via pip. Does not contain shell, image I/O, and GUI, only ScaleNx core for developers.
-
Dnyarri website - the rest of Dnyarri stuff with previews etc.
-
gitflic Dnyarri mirror.