{"id":13732026,"url":"https://github.com/septag/atlasc","last_synced_at":"2025-07-13T21:31:57.678Z","repository":{"id":149954952,"uuid":"178717299","full_name":"septag/atlasc","owner":"septag","description":"Builds atlas texture from a bunch of input images. ","archived":false,"fork":false,"pushed_at":"2020-03-26T21:43:06.000Z","size":1134,"stargazers_count":74,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T23:33:24.961Z","etag":null,"topics":["atlas","game-development","sprite","tool"],"latest_commit_sha":null,"homepage":"","language":"C","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/septag.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}},"created_at":"2019-03-31T17:04:36.000Z","updated_at":"2024-09-09T16:33:16.000Z","dependencies_parsed_at":"2023-08-21T20:49:22.005Z","dependency_job_id":null,"html_url":"https://github.com/septag/atlasc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/septag%2Fatlasc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/septag%2Fatlasc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/septag%2Fatlasc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/septag%2Fatlasc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/septag","download_url":"https://codeload.github.com/septag/atlasc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225919913,"owners_count":17545378,"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":["atlas","game-development","sprite","tool"],"created_at":"2024-08-03T02:01:44.207Z","updated_at":"2024-11-22T15:29:06.525Z","avatar_url":"https://github.com/septag.png","language":"C","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/septag/atlasc.svg?branch=master)](https://travis-ci.org/septag/atlasc)\n\n## Atlasc\n[@septag](https://twitter.com/septagh)  \n\n_atlasc_ is a command-line program that builds atlas texture from a bunch of input images.  \n\n## Main Features\n- Cross-platform. Runs on linux/macOS/windows.\n- No dependencies\n- Outputs atlas description to human-readable _json_ format. Generated images are _png_.\n- Alpha trimming.\n- Mesh sprites.\n- Scaling\n- Can build as static library\n\n![drawsprite-wire](img/drawsprite-wire.png)  \n\u003csub\u003e\u003csup\u003escreenshot taken from [rizz](https://github.com/septag/rizz) sprite example\u003c/sup\u003e\u003c/sub\u003e\n\n## Build\nIt has built and tested on the following platforms:\n\n- __Windows__: Tested on Windows10 with visual studio 14 2015 update 3 (Win64).  \n- __Linux__: Tested on ubuntu 16 with clang (6.0.0) and gcc (7.3.0). Package requirements:  \n- __MacOS__: Tested on MacOS High Sierra - AppleClang 9.1.0\n\n## Usage\n\n```\natlasc image1.png image2.png -o output.json [extra args]\n```\n\n**Arguments**:\n\n```\n-h --help                           - Print help text\n-V --version                        - Print version\n-i --input=\u003cFilepath\u003e               - Input image file(s)\n-o --output=\u003cFilepath\u003e              - Output file\n-W --max-width(=Pixels)             - Maximum output image width (default:1024)\n-H --max-height(=Pixels)            - Maximum output image height (default:1024)\n-B --border(=Pixels)                - Border size for each sprite (default:2)\n-2 --pot                            - Make output image size power-of-two\n-P --padding(=Pixels)               - Set padding for each sprite (default:1)\n-m --mesh                           - Make sprite meshes\n-M --max-verts(=Number)             - Set maximum vertices for each generated sprite mesh (default:25)\n-A --alpha-threshold(=Number)       - Alpha threshold for cropping (0..255)\n-s --scale(=Number)                 - Set scale for individual images (default:1.0)\n```\n\n## Static Library\nTo build _atlasc_ as static library instead of command-line tool, set `STATC_LIB` in cmake options.\n\n```\ncmake . -DSTATIC_LIB=1\n```\n\nThere are three methods for creating atlases using the library:\n\n- Load from image files and output to image file: `atlasc_make`\n- Load from image files and return atlas in memory: `atlasc_make_inmem`\n- Load from images loaded in memory and return atlas in memory: `atlasc_make_inmem_fromem`\n  \nFor more information, read the header file [atlasc.h](include/atlasc.h)\n\n## TODO\n- Support for islands. currently, there is a limitation that individual images should not have islands of pixels\n- Optimizations. It's a very early implementation and probably some parts of it has to be optimized \n\n## Open-Source libraries used\n- [sx](https://github.com/septag/sx): Portable base library\n- [sjson](https://github.com/septag/sjson): Fast and portable single-header C file Json encoder/decoder\n- [stb](https://github.com/nothings/stb): stb single-file public domain libraries for C/C++\n- [sproutline](https://github.com/ands/sproutline): A small single-file library for sprite outline extraction and simplification\n- [delanuay](https://github.com/eloraiby/delaunay): Relatively Robust Divide and Conquer 2D Delaunay Construction Algorithm\n\n\n[License (BSD 2-clause)](https://github.com/septag/atlasc/blob/master/LICENSE)\n--------------------------------------------------------------------------\n\n\u003ca href=\"http://opensource.org/licenses/BSD-2-Clause\" target=\"_blank\"\u003e\n\u003cimg align=\"right\" src=\"http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png\"\u003e\n\u003c/a\u003e\n\n\tCopyright 2019 Sepehr Taghdisian. All rights reserved.\n\t\n\thttps://github.com/septag/atlasc\n\t\n\tRedistribution and use in source and binary forms, with or without\n\tmodification, are permitted provided that the following conditions are met:\n\t\n\t   1. Redistributions of source code must retain the above copyright notice,\n\t      this list of conditions and the following disclaimer.\n\t\n\t   2. Redistributions in binary form must reproduce the above copyright notice,\n\t      this list of conditions and the following disclaimer in the documentation\n\t      and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR\n\tIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n\tMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n\tEVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n\tINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\tBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\tDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n\tLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n\tOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseptag%2Fatlasc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseptag%2Fatlasc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseptag%2Fatlasc/lists"}