{"id":13602678,"url":"https://github.com/gkajs/gka","last_synced_at":"2025-10-07T01:11:08.437Z","repository":{"id":43642777,"uuid":"77895105","full_name":"gkajs/gka","owner":"gkajs","description":"一款高效、高性能的帧动画生成工具","archived":false,"fork":false,"pushed_at":"2023-12-07T15:08:59.000Z","size":1380,"stargazers_count":2094,"open_issues_count":4,"forks_count":222,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-10-01T17:48:15.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gka.js.org","language":"JavaScript","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/gkajs.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-01-03T07:44:33.000Z","updated_at":"2025-09-22T15:49:01.000Z","dependencies_parsed_at":"2024-01-18T15:57:04.200Z","dependency_job_id":"a9adafc5-f3c8-4a58-8487-4d3ac10964df","html_url":"https://github.com/gkajs/gka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gkajs/gka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkajs%2Fgka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkajs%2Fgka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkajs%2Fgka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkajs%2Fgka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkajs","download_url":"https://codeload.github.com/gkajs/gka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkajs%2Fgka/sbom","scorecard":{"id":428853,"data":{"date":"2025-08-11","repo":{"name":"github.com/gkajs/gka","commit":"a250bd76d19d125a3aa0488da906f76f833a610c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":3,"reason":"Found 6/17 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T02:51:25.880Z","repository_id":43642777,"created_at":"2025-08-19T02:51:25.880Z","updated_at":"2025-08-19T02:51:25.880Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278704528,"owners_count":26031382,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-01T18:01:33.538Z","updated_at":"2025-10-07T01:11:08.399Z","avatar_url":"https://github.com/gkajs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","工具库"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href =\"https://github.com/joeyguo/gka\"\u003e\u003cimg alt=\"gka\" src=\"https://user-images.githubusercontent.com/10385585/28497647-cfc6ceba-6fbe-11e7-9f32-9ff1895b893b.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n \u003ca href =\"https://github.com/joeyguo/gka\"\u003e\u003cimg alt=\"gka\" src=\"https://user-images.githubusercontent.com/10385585/27863888-bb5e4826-61be-11e7-8994-4b19bb49bb22.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n简单的、高效的帧动画生成工具\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.org/package/gka\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/gka.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.org/package/gka\"\u003e\u003cimg src=\"https://img.shields.io/node/v/gka.svg?maxAge=2592001\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/joeyguo/gka#license\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/joeyguo/gka\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/d4e0f63e9613ee474a7dfdc23c240b9795712c96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n--- \n\n# GKA\n\n[gka](https://github.com/joeyguo/gka) 是一款简单的、高效的帧动画生成工具，图片处理工具。\n\n只需一行命令，快速图片优化、生成动画文件，支持效果预览。\n\n* **一键式:**  图片文件批量序列化重命名，生成帧动画文件，支持预览\n* **性能佳:**  支持`相同图片复用`✓ `图片空白裁剪`✓ `合图优化`✓ `图片压缩`✓ `图片空白拆分优化`✓ `图片像素差优化`✓ `多倍图适配`✓\n* **多模板:**  内置多种文件输出模板，支持自定义模板\n\n在线官方文档：[https://gka.js.org](https://gka.js.org)\n\n![gka-show](https://user-images.githubusercontent.com/10385585/28651130-77b0bc80-72b2-11e7-9c42-7aad9e5774a7.jpg)\n\n# 快速开始\n\n## 安装\n\n```bash\nsudo npm install -g gka --unsafe-perm=true --allow-root\n```\n注：安装时如出现权限问题，可先查看此[issues](https://github.com/gkajs/gka/issues/23)\n\n## 开始使用\n\n只需一行命令，快速生成动画文件，支持效果预览。\n\n```bash\ngka E:\\img  # 对 E:\\img 目录中的图片进行处理\n```\n\n生成新的文件、效果预览\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\u003cth\u003e处理前\u003c/th\u003e\u003cth\u003e处理后\u003c/th\u003e\u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003cpre\u003e\u003ccode\u003e\n./img\n├── gka_1.png\n├── gka_2.png\n├── gka_3.png\n└── ...\n\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cpre\u003e\u003ccode\u003e\n./gka-img\n└── gka.html\n└── gka.css\n└── img\n    ├── gka_1.png\n    ├── gka_2.png\n    ├── gka_3.png\n    └── ...\n\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n![rockit](https://user-images.githubusercontent.com/10385585/28810071-499e24a2-76ba-11e7-9ee8-cd600c0035b1.gif)\n\n# 使用教程\n\n## gka\n\n一键快速图片优化、生成动画文件。\n\n### Command 命令 \n\n```bash\ngka \u003cdir\u003e [options]\n```\n\n### Options 参数选项 \n\n```\n-d, --dir \u003cstring\u003e            #  图片文件夹地址\n\n-u, --unique [boolean]        #  开启相同图片复用优化\n\n-c, --crop [boolean]          #  开启空白裁剪优化\n\n-s, --sprites [boolean]       #  开启合图优化\n\n-m, --mini [boolean]          #  开启图片压缩\n\n-p, --prefix [string]         #  文件重命名前缀\n\n-t, --template \u003cstring\u003e       #  生成动画文件模板 默认 css ，可选模见 Templates 模板列表\n\n-f, --frameduration \u003cnumber\u003e  #  每帧时长，默认 0.04\n\n-i, --info [boolean]          #  开启输出信息文件\n\n-o, --output \u003cstring\u003e         #  指定生成目录地址\n\n-a, --algorithm \u003cstring\u003e      #  合图布局模式 默认 left-right，可选 binary-tree | top-down ..\n\n--bgcolor \u003cstring\u003e            #  为图片增加背景色，可选，支持格式：'rgb(255,205,44)'、 '#ffcd2c'\n\n--count \u003cnumber\u003e              #  生成多合图，指定几张图片合成一张合图，可选\n\n--ratio \u003cnumber\u003e              #  生成指定的N倍图动画，如 --ratio 2 支持retina屏幕的2倍图动画， 可选\n\n--split [boolean]             #  开启图片空白拆分优化，与 -t canvas 结合使用\n\n--diff [boolean]              #  开启图片像素差优化，与 -t canvas 结合使用\n\n--minirate [string]           #  自定义压缩比率，格式: min-max，与 -m 结合使用\n\n```\n\n### Templates 模板列表\n\u003c!-- ### List of Templates Plugins  --\u003e\n\n使用方式\n\n```bash\ngka 图片目录 -t 模板名\n```\n\n#### 内置的模板列表\n\n- css\n\n    - 默认模板\n    - 输出 css 动画文件\n    - 结合 -ucs 支持 `相同帧图片复用`✓ `空白裁剪优化`✓ `合图优化`✓ (可选) \n\n- canvas\n\n    - 输出 canvas 动画文件\n    - 结合 -ucs 支持 `相同帧图片复用`✓ `空白裁剪优化`✓ `合图优化`✓ (可选) \n    - 结合 --diff 支持 `图片像素差优化`✓ (可选) \n    - 结合 --split 支持 `图片空白拆分优化`✓ (可选) \n\n- svg\n\n    - 输出 svg 动画文件，支持 `自适应缩放雪碧图`✓ \n    - 结合 -ucs 支持 `相同帧图片复用`✓ `空白裁剪优化`✓ `合图优化`✓ (可选) \n\n- wechat-svg\n\n    - 输出微信公众号文章所支持的 svg 序列帧片段\n    - 结合 -us 支持 `相同帧图片复用`✓ `合图优化`✓ (可选) \n\n#### 内置的自定义模板列表\n\n- percent \n\n    - 输出 css 百分比动画文件\n    - 使用该方案支持 `移动端多倍图适配`✓ `自适应缩放雪碧图`✓ \n    - 结合 -u 支持 `相同帧图片复用`✓ (可选) \n    - 默认开启 `开启合图优化`✓\n    - [Github 地址](https://github.com/gkajs/gka-tpl-percent)\n    \n- createjs \n\n    - 输出 createjs 精灵图动画文件\n    - 结合 -uc 支持 `相同帧图片复用`✓ `空白裁剪优化`✓ (可选) \n    - 默认开启 `开启合图优化`✓\n    - [Github 地址](https://github.com/gkajs/gka-tpl-createjs)\n\n- studiojs \n\n    - 输出 studiojs 动画文件\n    - 结合 -uc 支持 `相同帧图片复用`✓ `空白裁剪优化`✓ (可选) \n    - 默认开启 `开启合图优化`✓\n    - [Github 地址](https://github.com/gkajs/gka-tpl-studiojs)\n\n#### 增加模板\n\n模板支持动态增加，只需安装需要的模板。即时安装，即刻可用。\n\n```bash\nnpm i gka-tpl-模板名 -g\n```\n\n### 使用示例\n\n对 E:\\img 目录中的图片进行处理。\n\n1. 快速生成帧动画\n\n```bash\ngka E:\\img\n```\n\n2. 进行图片去重、合图优化，输出 css 动画文件\n\n```bash\ngka E:\\img -us\n```\n\n3. 进行图片去重、空白裁剪、合图优化，使用 canvas 模板，输出 canvas 动画文件\n\n```bash\ngka E:\\img -ucs -t canvas\n```\n\n# 定制化\n\n\u003c!-- ## List of Templates --\u003e\n## 开发模板 TODO\n\n#### 命名规范\n#### 开发流程\n#### 发布模版\n#### 使用模板\n\n# Welcome\n\n* 欢迎 Pull requests、Issues 一般在24小时内处理\n* 讨论与咨询请+QQ 3201590286  :D\n\n# License\n\n[MIT](./LICENSE) \n\nCopyright (c) 2017 - present, joeyguo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkajs%2Fgka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkajs%2Fgka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkajs%2Fgka/lists"}