{"id":15310646,"url":"https://github.com/timvanscherpenzeel/texture-compressor","last_synced_at":"2025-10-08T18:30:22.924Z","repository":{"id":37359506,"uuid":"110331003","full_name":"TimvanScherpenzeel/texture-compressor","owner":"TimvanScherpenzeel","description":"CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.","archived":true,"fork":false,"pushed_at":"2022-01-18T10:36:42.000Z","size":21010,"stargazers_count":195,"open_issues_count":4,"forks_count":40,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-03T03:58:04.387Z","etag":null,"topics":["android","astc","cli","compression","dds","desktop","dxt5","etc","game-development","gpu","iphone","ktx","mobile","optimisation","pvr","pvrtc","s3tc","texture-compression","threejs","webgl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/TimvanScherpenzeel.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}},"created_at":"2017-11-11T08:43:32.000Z","updated_at":"2024-03-29T07:34:21.000Z","dependencies_parsed_at":"2022-09-05T15:50:41.003Z","dependency_job_id":null,"html_url":"https://github.com/TimvanScherpenzeel/texture-compressor","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/TimvanScherpenzeel%2Ftexture-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Ftexture-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Ftexture-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimvanScherpenzeel%2Ftexture-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimvanScherpenzeel","download_url":"https://codeload.github.com/TimvanScherpenzeel/texture-compressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877301,"owners_count":16554910,"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":["android","astc","cli","compression","dds","desktop","dxt5","etc","game-development","gpu","iphone","ktx","mobile","optimisation","pvr","pvrtc","s3tc","texture-compression","threejs","webgl"],"created_at":"2024-10-01T08:28:57.580Z","updated_at":"2025-10-08T18:30:15.548Z","avatar_url":"https://github.com/TimvanScherpenzeel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Texture Compressor\n\n[![npm version](https://badge.fury.io/js/texture-compressor.svg)](https://badge.fury.io/js/texture-compressor)\n\nCLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.\n\n## Installation\n\nMake sure you have [Node.js](http://nodejs.org/) installed.\n\n```sh\n $ npm install texture-compressor\n```\n\n## Live demo\n\n[Live demo](https://timvanscherpenzeel.github.io/texture-compressor/)\n\n## Documentation\n\n[Supported devices table](docs/SUPPORTED_DEVICES_TABLE.md)\n\n[Supported parameters](docs/SUPPORTED_PARAMETERS.md)\n\n[Recommended parameters](docs/RECOMMENDED_PARAMETERS.md)\n\n## CLI Usage\n\n### ASTC\n\n```sh\n$ node ./bin/texture-compressor -i input/example.png -t astc -c ASTC_4x4 -q astcmedium -o output/example-astc.ktx -y -m -vb\n```\n\n### ETC\n\n```sh\n$ node ./bin/texture-compressor -i input/example.png -t etc -c ETC2_RGB -q etcfast -o output/example-etc.ktx -y -m -vb\n```\n\n### PVRTC\n\n```sh\n$ node ./bin/texture-compressor -i input/example.png -t pvrtc -c PVRTC1_2 -q pvrtcnormal -o output/example-pvrtc.ktx -y -m -vb\n```\n\n### S3TC\n\n```sh\n$ node ./bin/texture-compressor -i input/example.png -t s3tc -c DXT1 -q normal -o output/example-s3tc.ktx -y -m -vb\n```\n\n## Module usage\n\n```js\nconst { pack } = require('./dist/cli/lib/index');\n\npack({\n  type: 'astc',\n  input: 'input/example.png',\n  output: 'output/example-astc.ktx',\n  compression: 'ASTC_4x4',\n  quality: 'astcmedium',\n  verbose: true,\n}).then(() =\u003e console.log('done!'));\n```\n\n## Flags\n\n### Required\n\n    -i, --input [example: ./input/example.png] [required]\n    -o, --output [example: ./output/example.ktx] [required]\n    -t, --type [example: astc, etc, pvrtc, s3tc] [required]\n    -c, --compression [example: ASTC_4x4, ETC2_RGB, PVRTC1_2, DXT1] [required]\n    -q, --quality [example: astcmedium, etcfast, pvrtcnormal, normal] [required]\n\n### Optional\n\n    -vb, --verbose [true / false, default: false] [not required]\n\n    -rs, --square ['no', '-', '+', default: +] [not required]\n    -rp, --pot ['no', '-', '+', default: +] [not required]\n    -m, --mipmap [true / false, default: false] [not required]\n    -y, --flipY [tue / false, default: false] [not required]\n\n### Tool flags\n\nTool flags are not processed by `texture-compressor` but rather directly by the binary you are targeting itself.\n\nFor example adding `--flags [\"usesourceformat DXT1A\" \"alphaThreshold 200\"]` will pass `usesourceformat DXT1A` and `alphaThreshold 200` directly to `Crunch`.\n\nPlease be aware that these flags are tool specific and can therefore not be directly applied to the other binaries.\n\n    -f, --flags [\"flag value\" \"flag value\"] [not required]\n\nTo find tool specific flags please refer to the manuals of [ASTC](http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf), [ETC](http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf), [PVRTC](http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf), [S3TC](https://github.com/BinomialLLC/crunch/blob/235946f7a1cf8b9c97e8bf0e8062d5439a51dec7/crunch/crunch.cpp#L70-L181).\n\n## License\n\nMy work is released under the [MIT license](https://raw.githubusercontent.com/TimvanScherpenzeel/texture-compressor/master/LICENSE).\n\nThis repository distributes multiple binary tools for Windows, Mac and Linux.\nThis product includes components of the PowerVR™ SDK from Imagination Technologies Limited.\n\n- [astcenc](https://raw.githubusercontent.com/ARM-software/astc-encoder/master/license.txt)\n- [PVRTexToolCLI](https://community.imgtec.com/developers/powervr/sdk-end-user-licence-agreement/)\n- [crunch](https://raw.githubusercontent.com/BinomialLLC/crunch/master/license.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvanscherpenzeel%2Ftexture-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimvanscherpenzeel%2Ftexture-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimvanscherpenzeel%2Ftexture-compressor/lists"}