feat: add extended animation encoding options#5
Open
heidi-alps wants to merge 11 commits into
Open
Conversation
Add support for additional WebP animation encoding options: - minimize_size: minimize output size (slower, like img2webp -min_size) - allow_mixed: allow mixed lossy/lossless per frame - loop_count: animation loop count (0 = infinite) - bgcolor: background color (ARGB format) - kmin/kmax: keyframe distance control Also add per-frame encoding configuration: - Each frame can have its own lossless/quality settings - Enables fine-grained control over animation compression The existing encodeAnimation() API remains backward compatible. When options parameter is provided, the new encodeAnimationEx() C++ function is called internally. Fixed memory leaks in original encodeAnimation(): - Added WebPPictureFree() calls - Added final NULL frame for correct duration - Added WebPDataInit/Clear for proper cleanup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- libwebp 소스를 직접 포함 (서브모듈 → vendor) - emsdk 서브모듈 제거 (CI/CD 환경 변수로 대체) - Makefile/build.sh에서 EMSDK 환경변수 사용 - README.md에 빌드 환경 및 Integration Guide 문서화 - .gitignore에 libwebp 빌드 아티팩트 제외 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Internal GitHub Enterprise restricts workflow files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- libwebp v1.3.2 from https://chromium.googlesource.com/webm/libwebp - Update README with submodule instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- emsdk 3.1.74 from https://github.com/emscripten-core/emsdk - build.sh auto-installs emsdk if EMSDK env not set - Makefile uses EMSDK env or falls back to ./emsdk - Update README with submodule documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add src/webp-wasm.js and src/webp-wasm.wasm to .gitignore - Remove from git tracking (files generated by npm run build-wasm:dev) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove libwebp entries (managed as submodule) - Simplify comment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
|
Could you add one API example to |
This reverts commit 515706f.
- Add WebPAnimationOptions documentation with all properties - Add WebPFrameConfig documentation for per-frame settings - Add example for global animation options (loop_count, bgcolor, etc.) - Add example for per-frame quality configuration - Fix typo: "chanel" -> "channel" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
Hi @nieyuyao, I've addressed your feedback:
The CI workflow has been triggered but requires your approval to run (since this is a fork PR). Could you please approve the workflow run? Thank you! |
nieyuyao
reviewed
Jan 15, 2026
| @@ -1,10 +1,6 @@ | |||
| [submodule "libwebp"] | |||
| path = libwebp | |||
| branch = "v1.3.2" | |||
Owner
There was a problem hiding this comment.
it would be better to specify a branch or tag here. @heidi-alps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New Animation Options
minimize_sizeimg2webp -min_size)allow_mixedloop_countbgcolorkmin/kmaxPer-Frame Configuration
Each frame can now have its own
configwithlosslessandqualitysettings.Usage Example
Bug Fixes
WebPPictureFree()calls to prevent memory leaksWebPDataInit/Clearfor proper cleanupTest plan
npm test)🤖 Generated with Claude Code