{ "info": { "author": "K0lb3", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: zlib/libpng License", "Programming Language :: Cython", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Multimedia :: Graphics" ], "description": "# ASTC_Codec\nAn ASTC decoder for PIL.\n\nThe decoder uses [Google/astc-codec](https://github.com/google/astc-codec) to decompress the data.\n\n\n## Installation\n- Cython required\n### PIP\n```\npip install astc_codec\n```\n### Manual\n```cmd\npython setup.py install\n```\n\n\n## Usage\n### valid block_sizes\n\n|block size | footprint | footprint id |\n|---|---|---|\n| (4, 4) | k4x4 | 0 |\n| (5, 4) | k5x4 | 1 |\n| (5, 5) | k5x5 | 2 |\n| (6, 5) | k6x5 | 3 |\n| (6, 6) | k6x6 | 4 |\n| (8, 5) | k8x5 | 5 |\n| (8, 6) | k8x6 | 6 |\n| (10, 5) | k10x5 | 7 |\n| (10, 6) | k10x6 | 8 |\n| (8, 8) | k8x8 | 9 |\n| (10, 8) | k10x8 | 10 |\n| (10, 10) | k10x10 | 11 |\n| (12, 10) | k12x10 | 12 |\n| (12, 12) | k12x12 | 13 |\n\n### PIL.Image decoder\n```python\nfrom PIL import Image\nimport astc_codec \n#needs to be imported once in the active code, so that the codec can register itself\n\nraw_astc_image_data : bytes\nblock_size = (int, int) # see valid block_sizes\nimg = Image.frombytes('RGBA', size, raw_astc_image_data, 'astc', block_size)\n```\n\n### raw decoder\n```python\nfrom astc_codec import decompress_astc, ASTCDecompressToRGBA\n\n# ASTC to RGBA\nrgba_data = decompress_astc(astc_data : bytes, block_size : (int, int), width : int, height : int)\n\n# ASTC to RGBA, direct mapping to the C++ function\n# footprint = footprint id from valid block_sizes\nrgba_data = ASTCDecompressToRGBA(astc_data : bytes, astc_data_size : int,\n width : int, height : int, footprint : int, out_buffer_size : int,\n out_buffer_stride : int)\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/K0lb3/astc_codec/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/K0lb3/astc_codec/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "astc-codec", "package_url": "https://pypi.org/project/astc-codec/", "platform": "", "project_url": "https://pypi.org/project/astc-codec/", "project_urls": { "Download": "https://github.com/K0lb3/astc_codec/tarball/master", "Homepage": "https://github.com/K0lb3/astc_codec/" }, "release_url": "https://pypi.org/project/astc-codec/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "ASTC decoder for PIL", "version": "1.0.2" }, "last_serial": 5920840, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "48751bee9da34a5010b756a739bd351a", "sha256": "71968479c1d82a094019e66492634f166ea712cd56f05ad371ad9901e0de800b" }, "downloads": -1, "filename": "astc_codec-1.0.tar.gz", "has_sig": false, "md5_digest": "48751bee9da34a5010b756a739bd351a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 85805, "upload_time": "2019-10-02T22:08:44", "url": "https://files.pythonhosted.org/packages/b3/37/387955220b655160b8a80225e7cd1bff7d3e09bfce1ea3285e0d5f0a473c/astc_codec-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "774bde74436f468f8e189590b876e099", "sha256": "0f16ba64a93dc53609135b8a11121f9582f0396e48b7e6a7baa7e2d183098152" }, "downloads": -1, "filename": "astc_codec-1.0.1.tar.gz", "has_sig": false, "md5_digest": "774bde74436f468f8e189590b876e099", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43059, "upload_time": "2019-10-02T22:14:48", "url": "https://files.pythonhosted.org/packages/08/4e/a63c6b3b856f80384bb6b8f3d815cfaa7b31de4193d6ae24d7838bb2024b/astc_codec-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "a3023d9ea2a444cac43a19f3f67151fa", "sha256": "3d7675639362b48179a5c9c56bdf7606957522fe8040c215ba72b66056170a13" }, "downloads": -1, "filename": "astc_codec-1.0.2.tar.gz", "has_sig": false, "md5_digest": "a3023d9ea2a444cac43a19f3f67151fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86317, "upload_time": "2019-10-02T22:18:26", "url": "https://files.pythonhosted.org/packages/bd/e4/4f37c1ff304b1e8d980613be0f57c347850f8b5d54edc49d8d3b18b6a581/astc_codec-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3023d9ea2a444cac43a19f3f67151fa", "sha256": "3d7675639362b48179a5c9c56bdf7606957522fe8040c215ba72b66056170a13" }, "downloads": -1, "filename": "astc_codec-1.0.2.tar.gz", "has_sig": false, "md5_digest": "a3023d9ea2a444cac43a19f3f67151fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86317, "upload_time": "2019-10-02T22:18:26", "url": "https://files.pythonhosted.org/packages/bd/e4/4f37c1ff304b1e8d980613be0f57c347850f8b5d54edc49d8d3b18b6a581/astc_codec-1.0.2.tar.gz" } ] }