{"id":13732027,"url":"https://github.com/huxingyi/squeezer","last_synced_at":"2025-04-22T03:31:44.697Z","repository":{"id":68522847,"uuid":"63038366","full_name":"huxingyi/squeezer","owner":"huxingyi","description":"Texture Packer for Game Development Using MaxRects Algorithm","archived":false,"fork":false,"pushed_at":"2020-06-24T21:20:53.000Z","size":2038,"stargazers_count":69,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T02:10:43.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huxingyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":"huxingyi"}},"created_at":"2016-07-11T05:09:47.000Z","updated_at":"2024-08-02T07:27:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"42226fd0-4df0-419c-be84-5c8bb543783a","html_url":"https://github.com/huxingyi/squeezer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huxingyi%2Fsqueezer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huxingyi%2Fsqueezer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huxingyi%2Fsqueezer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huxingyi%2Fsqueezer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huxingyi","download_url":"https://codeload.github.com/huxingyi/squeezer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223888448,"owners_count":17220072,"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":"2024-08-03T02:01:44.243Z","updated_at":"2024-11-09T21:36:40.567Z","avatar_url":"https://github.com/huxingyi.png","language":"C","readme":"Overview \u003cimg src=\"https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000\" width=\"122\" height=\"20\"/\u003e [![Build Status](https://travis-ci.org/huxingyi/squeezer.svg?branch=master)](https://travis-ci.org/huxingyi/squeezer) [![Build status](https://ci.appveyor.com/api/projects/status/h9vckwyht5e0pj87/branch/master?svg=true)](https://ci.appveyor.com/project/huxingyi/squeezer/branch/master)\n------------\n**Texture Packer** for Game Development Using MaxRects Algorithm.  \n\n\u003cimg src=\"https://raw.githubusercontent.com/huxingyi/squeezer/master/example/squeezer.png\" width=\"512\" height=\"256\"/\u003e  \n\n*Note: The game assets used in this example were download from [Grassland Tileset](http://opengameart.org/content/grassland-tileset), thanks `Clint Bellanger` for made so many awesome game resources.*  \n\nContributing\n--------------\nDon't hesitate to make a pull request. All kinds of contribution are welcome.  \n*Note: Please follow the coding style of the existed codes.*\n\nBuilding(Linux/OSX)\n---------------\n```sh\n$ cd ./src\n$ make\n```\n\nBuilding(Windows)\n--------------\n```sh\n$ cd .\\src\n$ nmake -f Makefile.mak\n```\n\nUsage\n--------------\n```sh\nusage: squeezerw [options] \u003csprite image dir\u003e\n    options:\n        --width \u003coutput width\u003e\n        --height \u003coutput height\u003e\n        --allowRotations \u003c1/0/true/false/yes/no\u003e\n        --border \u003c1/0/true/false/yes/no\u003e\n        --outputTexture \u003coutput texture filename\u003e\n        --outputInfo \u003coutput sprite info filename\u003e\n        --infoHeader \u003coutput header template\u003e\n        --infoBody \u003coutput body template\u003e\n        --infoSplit \u003coutput body split template\u003e\n        --infoFooter \u003coutput footer template\u003e\n        --verbose\n        --version\n    format specifiers of infoHeader/infoBody/infoFooter:\n        %W: output width\n        %H: output height\n        %n: image name\n        %w: image width\n        %h: image height\n        %x: left on output image\n        %y: top on output image\n        %l: trim offset left\n        %t: trim offset top\n        %c: original width\n        %r: original height\n        %f: 1 if rotated else 0\n        and '\\n', '\\r', '\\t'\n```\n\nExample\n------------\n```sh\n$ cd ./src\n$ make\n\n$ ./squeezerw ../example/images --verbose --width 512 --height 256 --border 1 --outputTexture ../example/squeezer.png --outputInfo ../example/squeezer.xml\n\n$ ./squeezerw ../example/images --verbose --width 512 --height 256 --border 1 --outputTexture ../example/squeezer.png --outputInfo ../example/squeezer.json --infoHeader \"{\\\"textureWidth\\\":\\\"%W\\\", \\\"textureHeight\\\":\\\"%H\\\", \\\"items\\\":[\\n\" --infoFooter \"]}\" --infoBody \"{\\\"name\\\":\\\"%n\\\", \\\"width\\\":\\\"%w\\\", \\\"height\\\":\\\"%h\\\", \\\"left\\\":\\\"%x\\\", \\\"top\\\":\\\"%y\\\", \\\"rotated\\\":\\\"%f\\\", \\\"trimOffsetLeft\\\":\\\"%l\\\", \\\"trimOffsetTop\\\":\\\"%t\\\", \\\"originWidth\\\":\\\"%c\\\", \\\"originHeight\\\":\\\"%r\\\"}\" --infoSplit \"\\n,\"\n```\n\nLicensing\n-----------------\nLicensed under the MIT license except lodepng.c and lodepng.h.  \n\n*Note: [lodepng](https://github.com/lvandeve/lodepng) used in this project to decode and encode png format. For the license used in lodepng please visit [lodepng](https://github.com/lvandeve/lodepng) directly.*\n\nReferences\n------------\n1. http://www.blackpawn.com/texts/lightmaps/  \n2. http://clb.demon.fi/projects/more-rectangle-bin-packing  \n3. http://wiki.unity3d.com/index.php?title=MaxRectsBinPack  \n4. https://github.com/juj/RectangleBinPack  \n5. http://opengameart.org/content/flare-weapon-icons-2  \n","funding_links":["https://github.com/sponsors/huxingyi"],"categories":["Graphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuxingyi%2Fsqueezer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuxingyi%2Fsqueezer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuxingyi%2Fsqueezer/lists"}