{"id":27168178,"url":"https://github.com/maclovin/simple-pixel-sprite-generator","last_synced_at":"2025-10-05T18:46:42.499Z","repository":{"id":281560591,"uuid":"945556670","full_name":"maclovin/simple-pixel-sprite-generator","owner":"maclovin","description":"Medium and High resolution textures into retro-like textures and sprites.","archived":false,"fork":false,"pushed_at":"2025-03-09T22:27:37.000Z","size":2026,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T23:23:44.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maclovin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-09T17:44:29.000Z","updated_at":"2025-03-09T22:27:40.000Z","dependencies_parsed_at":"2025-03-09T23:23:52.999Z","dependency_job_id":"845f4548-d0b8-4223-b6a7-215ba8e72c08","html_url":"https://github.com/maclovin/simple-pixel-sprite-generator","commit_stats":null,"previous_names":["maclovin/simple-pixel-sprite-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maclovin%2Fsimple-pixel-sprite-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maclovin%2Fsimple-pixel-sprite-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maclovin%2Fsimple-pixel-sprite-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maclovin%2Fsimple-pixel-sprite-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maclovin","download_url":"https://codeload.github.com/maclovin/simple-pixel-sprite-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247985802,"owners_count":21028762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T05:29:30.932Z","updated_at":"2025-10-05T18:46:42.439Z","avatar_url":"https://github.com/maclovin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Pixel Sprite Generator\n\nSimple Pixel Sprite Generator is a lightweight Python tool that converts images into pixel art textures and spritemap by applying a pixelation effect. It can process a single image or a directory of images (supporting PNG and TGA formats), and can optionally generate a spritemap that arranges all processed images in a grid. The tool also provides an optional auto-contrast adjustment to enhance the clarity of the pixelated images.\n\n## Features\n\n- **Input Flexibility:** Process a single image or multiple images from a directory.\n- **Supported Formats:** Works with PNG and TGA image formats.\n- **Adjustable Pixelation:** Set the pixelation level with customizable values (suggested: 4, 8, 16, 32; default: 16).\n- **Auto-Contrast Option:** Optionally apply auto-contrast adjustment to make images clearer.\n- **Spritemap Generation:** Option to combine all processed images into one large PNG spritemap.\n\n## Requirements\n\n- **Python 3.x**\n- **Pillow Library** \n## Installation\n1 - Clone or download the repository.\n2 - Install the required dependency:\n\n```\npython3 -m pip install -r requirements.txt\n```\n\n## Usage\nRun the script using Python from the command line. Below are some usage examples:\n\n### Example 1: Process a Single Image\nProcess a single image with a pixel size of 4 and apply auto-contrast:\n\n```\npython3 simple-pixel-sprite-generator.py --input path/to/image.png --pixel-size 4 --auto-adjust\n```\n\n### Example 2: Process a Directory and Generate a Spritemap\nProcess all images in a directory, specify an output folder, and generate a spritemap:\n\n```\npython3 simple-pixel-sprite-generator.py --input path/to/images/ --output path/to/output/ --spritemap\n```\n\n## Samples\n![Textures Samples](https://github.com/maclovin/simple-pixel-sprite-generator/blob/main/doc/textures-before-after.png?raw=true)\n\n\n![Generated Spritemap](https://github.com/maclovin/simple-pixel-sprite-generator/blob/main/doc/spritemap.png?raw=true)\n\n\n![Unity Scene Using Pixelated Textures](https://github.com/maclovin/simple-pixel-sprite-generator/blob/main/doc/unity-example.png?raw=true)\n\n## Acknowledgements\n- This tool leverages the Pillow library for image processing.\n- Part of the \"color auto-adjustment\" code and the documentation of the methods was generated using ChatGPT o3-mini-high model.\n- Feel free to adjust or expand upon this documentation as needed for your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaclovin%2Fsimple-pixel-sprite-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaclovin%2Fsimple-pixel-sprite-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaclovin%2Fsimple-pixel-sprite-generator/lists"}