ScaleNx


NameScaleNx JSON
Version 2024.11.24.post2 PyPI version JSON
download
home_pagehttps://github.com/Dnyarri/PixelArtScaling
SummaryImage resizing using Scale2x and Scale3x algorithms, in pure Python.
upload_time2025-01-15 06:29:10
maintainerNone
docs_urlNone
authorIlya Razmanov
requires_python>=3.10
licenseNone
keywords scale2x scale3x advmame2 advmame3 pixel resize rescale image bitmap python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pixel Art Scaling - Scale2x and Scale3x

## Overview

[**Scale2x** and **Scale3x**](https://github.com/amadvance/scale2x) (aka **AdvMAME2x** and **AdvMAME3x**) algorithms were developed by [Andrea Mazzoleni](https://www.scale2x.it/) for sole purpose of scaling up small graphics like icons and game sprites.

However, apparently it appeared to be useful for scaling up text scans with low resolution before OCR, to improve OCR quality.

For this, current general purpose pure Python implementation of Scale2x and Scale3x was developed. Current implementation does not use any import, neither Python standard nor third party, and therefore is quite cross-platform and onmicompatible.

For examples of practical programs utilizing this module, with GUI, multiprocessing etc., please visit [ScaleNx at Github](https://github.com/Dnyarri/PixelArtScaling). PNG support in these programs is based on [PyPNG](https://gitlab.com/drj11/pypng), and PPM and PGM support - on [PyPNM](https://pypi.org/project/PyPNM/), both of the above being pure Python modules as well.

## Installation

`pip install ScaleNx`, then `from scalenx import scale2x` or `from scalenx import scale3x`.

## Usage

`scaled_image = scale2x(source_image)`

where both images are of 3D nested list (image) of lists (rows) of lists (pixels) of int (channel values) type.

## Copyright and redistribution

Current Python implementation was written by [Ilya Razmanov](https://dnyarri.github.io/) and may be freely used, copied and improved. In case of making substantial improvements it's almost obligatory to share your work with the developer and lesser species.

## References

1. [Scale2x and Scale3x](https://www.scale2x.it/algorithm) algorithms description by the inventor, Andrea Mazzoleni.

2. [Pixel-art scaling algorithms](https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms) review at Wikipedia.

3. [ScaleNx at Github](https://github.com/Dnyarri/PixelArtScaling/) - current ScaleNx at Github, containing main programs for single and batch image processing.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Dnyarri/PixelArtScaling",
    "name": "ScaleNx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "scale2x, scale3x, AdvMAME2, AdvMAME3, pixel, resize, rescale, image, bitmap, python",
    "author": "Ilya Razmanov",
    "author_email": "ilyarazmanov@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/79/14/f68d24a579ea0a2234e2bf7b0ed515b0b800bc01981a1c57267f551c45dc/scalenx-2024.11.24.post2.tar.gz",
    "platform": null,
    "description": "# Pixel Art Scaling - Scale2x and Scale3x\r\n\r\n## Overview\r\n\r\n[**Scale2x** and **Scale3x**](https://github.com/amadvance/scale2x) (aka **AdvMAME2x** and **AdvMAME3x**) algorithms were developed by [Andrea Mazzoleni](https://www.scale2x.it/) for sole purpose of scaling up small graphics like icons and game sprites.\r\n\r\nHowever, apparently it appeared to be useful for scaling up text scans with low resolution before OCR, to improve OCR quality.\r\n\r\nFor this, current general purpose pure Python implementation of Scale2x and Scale3x was developed. Current implementation does not use any import, neither Python standard nor third party, and therefore is quite cross-platform and onmicompatible.\r\n\r\nFor examples of practical programs utilizing this module, with GUI, multiprocessing etc., please visit [ScaleNx at Github](https://github.com/Dnyarri/PixelArtScaling). PNG support in these programs is based on [PyPNG](https://gitlab.com/drj11/pypng), and PPM and PGM support - on [PyPNM](https://pypi.org/project/PyPNM/), both of the above being pure Python modules as well.\r\n\r\n## Installation\r\n\r\n`pip install ScaleNx`, then `from scalenx import scale2x` or `from scalenx import scale3x`.\r\n\r\n## Usage\r\n\r\n`scaled_image = scale2x(source_image)`\r\n\r\nwhere both images are of 3D nested list (image) of lists (rows) of lists (pixels) of int (channel values) type.\r\n\r\n## Copyright and redistribution\r\n\r\nCurrent Python implementation was written by [Ilya Razmanov](https://dnyarri.github.io/) and may be freely used, copied and improved. In case of making substantial improvements it's almost obligatory to share your work with the developer and lesser species.\r\n\r\n## References\r\n\r\n1. [Scale2x and Scale3x](https://www.scale2x.it/algorithm) algorithms description by the inventor, Andrea Mazzoleni.\r\n\r\n2. [Pixel-art scaling algorithms](https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms) review at Wikipedia.\r\n\r\n3. [ScaleNx at Github](https://github.com/Dnyarri/PixelArtScaling/) - current ScaleNx at Github, containing main programs for single and batch image processing.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Image resizing using Scale2x and Scale3x algorithms, in pure Python.",
    "version": "2024.11.24.post2",
    "project_urls": {
        "Homepage": "https://github.com/Dnyarri/PixelArtScaling"
    },
    "split_keywords": [
        "scale2x",
        " scale3x",
        " advmame2",
        " advmame3",
        " pixel",
        " resize",
        " rescale",
        " image",
        " bitmap",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f11c54d9071e8a7e02a3fb8e056a8a63151910cadc86406d5c2e7b81ca3184a",
                "md5": "e6a80e878bca7a67a51f5cbcbf2f8cba",
                "sha256": "71f3544c9cfec2c81a624714a63f4523e575d8b2803bf84529866bebc700ba37"
            },
            "downloads": -1,
            "filename": "ScaleNx-2024.11.24.post2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6a80e878bca7a67a51f5cbcbf2f8cba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5280,
            "upload_time": "2025-01-15T06:29:09",
            "upload_time_iso_8601": "2025-01-15T06:29:09.559357Z",
            "url": "https://files.pythonhosted.org/packages/0f/11/c54d9071e8a7e02a3fb8e056a8a63151910cadc86406d5c2e7b81ca3184a/ScaleNx-2024.11.24.post2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7914f68d24a579ea0a2234e2bf7b0ed515b0b800bc01981a1c57267f551c45dc",
                "md5": "960b92cca13683194a6c132e7ba5ba84",
                "sha256": "f4b1f6e49a87f17c88972e2335837ada3036905720437ac1e49009645f3fb959"
            },
            "downloads": -1,
            "filename": "scalenx-2024.11.24.post2.tar.gz",
            "has_sig": false,
            "md5_digest": "960b92cca13683194a6c132e7ba5ba84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4844,
            "upload_time": "2025-01-15T06:29:10",
            "upload_time_iso_8601": "2025-01-15T06:29:10.787789Z",
            "url": "https://files.pythonhosted.org/packages/79/14/f68d24a579ea0a2234e2bf7b0ed515b0b800bc01981a1c57267f551c45dc/scalenx-2024.11.24.post2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-15 06:29:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Dnyarri",
    "github_project": "PixelArtScaling",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "scalenx"
}
        
Elapsed time: 0.39688s