Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@steipete
Copy link
Contributor

Summary

  • fall back to JPEG when transparent PNGs still exceed size cap
  • add coverage for PNG alpha preservation + fallback behavior
  • bump changelog to 2026.1.23 with thanks

Testing

  • pnpm lint
  • pnpm build
  • pnpm test (flake: src/auto-reply/reply.block-streaming.test.ts)
  • pnpm exec vitest run src/auto-reply/reply.block-streaming.test.ts

@cursor
Copy link

cursor bot commented Jan 23, 2026

PR Summary

Improves image optimization to keep transparency when possible and ensure caps are met.

  • PNGs with alpha are now optimized as PNG and preserved when they fit under cap; otherwise they log and fall back to JPEG
  • Refactors optimizeAndClampImage to detect PNG alpha and choose PNG/JPEG accordingly; keeps HEIC→JPEG filename conversion
  • Adds tests for PNG alpha preservation and JPEG fallback behavior, plus existing GIF preservation paths
  • Updates CHANGELOG.md with the fix and attribution

Written by Cursor Bugbot for commit 9394fd6. This will update automatically on new commits. Configure here.

@steipete steipete force-pushed the fix/preserve-png-alpha-channel branch from 3eae338 to 9394fd6 Compare January 23, 2026 08:45
@steipete steipete merged commit e817c0c into main Jan 23, 2026
41 of 42 checks passed
@steipete steipete deleted the fix/preserve-png-alpha-channel branch January 23, 2026 08:45
@steipete
Copy link
Contributor Author

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test (flake in src/auto-reply/reply.block-streaming.test.ts)
  • Recheck: pnpm exec vitest run src/auto-reply/reply.block-streaming.test.ts
  • Land commit: 9394fd6
  • Merge commit: e817c0c

Thanks @robbyczgw-cla!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants