{"id":15049236,"url":"https://github.com/seng3694/pic-pac-poe","last_synced_at":"2026-01-01T23:04:36.003Z","repository":{"id":214730474,"uuid":"737204949","full_name":"Seng3694/pic-pac-poe","owner":"Seng3694","description":"A scriptable texture packing program","archived":false,"fork":false,"pushed_at":"2023-12-30T09:00:17.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T01:16:18.900Z","etag":null,"topics":["c","c99","lua","scriptable","texture-packer","texturepacker"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seng3694.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":"2023-12-30T07:07:52.000Z","updated_at":"2023-12-30T14:10:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb6e74ec-ac11-4d30-959c-4910144c9223","html_url":"https://github.com/Seng3694/pic-pac-poe","commit_stats":null,"previous_names":["seng3694/pic-pac-poe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seng3694%2Fpic-pac-poe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seng3694%2Fpic-pac-poe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seng3694%2Fpic-pac-poe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seng3694%2Fpic-pac-poe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seng3694","download_url":"https://codeload.github.com/Seng3694/pic-pac-poe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505960,"owners_count":20301619,"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":["c","c99","lua","scriptable","texture-packer","texturepacker"],"created_at":"2024-09-24T21:19:12.534Z","updated_at":"2026-01-01T23:04:35.931Z","avatar_url":"https://github.com/Seng3694.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pic Pac Poe\n\nA command line tool for packing textures. A **pic**ture **pac**king [poe](https://zelda.fandom.com/wiki/Poe).\n\n## Usage\n\nPipe png paths into the application and specify the packing script. Optionally specify the exporting script.\n\n```sh\nfind . -name '*.png' | ppp -ps example/bin_pack.lua -es example/header_export.lua\n```\n\nThis command will pack the images found into a single image using the `bin_pack.lua` script and exports a C header file with the `header_export.lua` script.\n\nUse `--help` for more information.\n\n```sh\nppp --help\n```\n\n## Example\n\nInput textures:\n\n![00](content/00.png)\n![02](content/02.png)\n![03](content/03.png)\n![17](content/17.png)\n![19](content/19.png)\n![22](content/22.png)\n![29](content/29.png)\n![30](content/30.png)\n\n```sh\nfind ./content -name '*.png' |\\\n    bin/ppp \\  \n        -ps example/bin_pack.lua \\ \n        -es example/header_export.lua \\ \n        -w 64 -po my_texture.png -eo my_texture.h\n```\n\nThis generates the following texture:\n\n![my_texture](content/my_texture.png)\n\n(Note: if you run this command then make sure to filter or delete the already existent `my_texture.png`)\n\nand exports a C header file:\n\n```c\n#ifndef MY_TEXTURE_H\n#define MY_TEXTURE_H\n\ntypedef enum {\n  MY_TEXTURE_ID_00,\n  MY_TEXTURE_ID_02,\n  MY_TEXTURE_ID_03,\n  MY_TEXTURE_ID_17,\n  MY_TEXTURE_ID_19,\n  MY_TEXTURE_ID_22,\n  MY_TEXTURE_ID_29,\n  MY_TEXTURE_ID_30\n} my_texture_id;\n\nstruct {\n  int left, top, width, height;\n} const static my_texture_rects[] = {\n  { 32, 96, 8, 8 },\n  { 40, 96, 8, 8 },\n  { 32, 104, 8, 8 },\n  { 16, 96, 16, 16 },\n  { 0, 96, 16, 16 },\n  { 0, 64, 32, 32 },\n  { 32, 64, 32, 32 },\n  { 0, 0, 64, 64 },\n};\n\n#endif\n\n```\n\n## Packing Lua API\n\n```lua\nfunction Pack(rectangles, width)\n    -- 'rectangles' is an unsorted array with rectangle tables\n    -- each rectangle has the following fields\n    --   left      (unset)\n    --   top       (unset)\n    --   width\n    --   height\n    --   textureId (only meant for internal use)\n\n    -- the 'width' parameter is a constraint for the output image\n\n    -- this function should return the rectangles array with set 'left' and 'top'\n    -- followed by the width and height of the output image\n    return rectangles, width, 123\nend\n```\n\nSee the [example](example/bin_pack.lua) for more information.\n\n## Exporting Lua API\n\n```lua\nfunction Export(textures, outputFile)\n    -- 'textures' is an unsorted array with texture tables\n    -- each texture has the following fields\n    --   left\n    --   top\n    --   width\n    --   height\n    --   name (file path which was originally piped into ppp)\n\n    -- 'outputFile' is a string containing the file path which should be used to write the outputs to\nend\n```\n\nSee the [example](example/header_example.lua) for more information.\n\n## Notes\n\n- ppp requires input from stdin when not using `--help`\n- ppp only works with png files\n\n## Build and install\n\n```sh\ngit clone https://github.com/seng3694/pic-pac-poe\ncd pic-pac-poe\nsudo make install release=1\n```\n\n## Uninstall\n\n```sh\nsudo make uninstall\n```\n\n## Dependencies\n\n- [Lua](https://github.com/lua/lua)\n- [stb_image](https://github.com/nothings/stb/)\n- [stb_image_write](https://github.com/nothings/stb/)\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseng3694%2Fpic-pac-poe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseng3694%2Fpic-pac-poe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseng3694%2Fpic-pac-poe/lists"}