Metadata-Version: 2.1
Name: xbrz.py
Version: 1.0.2
Summary: ctypes-based binding library for the xBRZ pixel-art image scaling algorithm
Home-page: https://github.com/iomintz/xbrz.py
Author: iomintz
Author-email: io@mintz.cc
License: AGPL-3.0-or-later
Description: # xbrz.py
        
        [![Build Status](https://travis-ci.com/ioistired/xbrz.py.svg?branch=master)](https://travis-ci.org/iomintz/xbrz.py)
        
        xbrz.py is a simple ctypes-based binding library for [xBRZ], a high-quality pixel-art image scaling algorithm.
        
        ## Installation
        
        Wheels are available for many platforms. If there isn't one for your platform, make sure you have a C++ compiler handy.
        
        ```
        pip install xbrz.py
        ```
        
        ## Usage
        
        ```py
        import xbrz
        
        # pixels is a list of 32 bit ints representing RGBA colors.
        # It is 32 * 24 long.
        pixels = ...
        scaled_pixels = xbrz.scale(pixels, 6, 32, 24, xbrz.ColorFormat.RGBA)
        
        # scaled_pixels is a 32 * 24 * 6 ** 2 long list of 32 bit ints representing the scaled image.
        ```
        
        ## Wand / Pillow support
        
        You can pass a Wand image to `xbrz.scale_wand(img, factor)` or a Pillow image to `xbrz.scale_pillow(img, factor)`.
        Neither libraries are required to use xbrz.py, however they can be installed via:
        
        ```
        pip install xbrz.py[wand]
        # or
        pip install xbrz.py[pillow]
        ```
        
        ## xbrz.py as an executable module
        
        Passing raw RGBA pixels to `python3 -m xbrz <factor> <width> <height>`
        via stdin will output scaled raw RGBA pixels to stdout.
        
        ## License
        
        AGPLv3, see LICENSE.md. The original xBRZ code is GPLv3 licensed.
        
        - lib/ is based on code provided by Zenju under the GPLv3 license. See lib/License.txt for details.
          Some changes were made:
          - Added some `extern "C"` declarations to the functions I intended to call from python.
          - Removed some namespace use to avoid being mangled.
          - Replaced a C++ template with a simple function that takes two arguments.
          - Converted the library to use RGBA instead of ARGB.
        - xbrz.py is based on lib/ and is released under the AGPLv3 license, see LICENSE.md for details.
        
        [xbrz]: https://sourceforge.net/projects/xbrz/
        
Platform: UNKNOWN
Classifier: Topic :: Software Development
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: C++
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
Provides-Extra: wand
Provides-Extra: pillow
