Skip to content

Conversation

@yisibl
Copy link
Member

@yisibl yisibl commented Jan 27, 2026

  • Add CropContext/CropResult structs to encapsulate crop calculations
  • Extract crop_by_bbox_inner() for shared NAPI/WASM implementation
  • Performance optimization: Add cropped_empty flag to skip rendering when crop yields no visible content
  • Skip resvg rendering for empty crops to avoid IntRect overflow panics
  • Move cropByBBox tests to dedicated index-bbox.spec.ts

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
resvg-js Ready Ready Preview, Comment Jan 28, 2026 3:31am

- Add `CropContext/CropResult` structs to encapsulate crop calculations
- Extract `crop_by_bbox_inner()` for shared NAPI/WASM implementation
- Performance optimization: Add `cropped_empty` flag to skip rendering when crop yields no visible content
- Skip resvg rendering for empty crops to avoid IntRect overflow panics
- Move cropByBBox tests to dedicated `index-bbox.spec.ts`
@yisibl yisibl force-pushed the refactor-crop_by_bbox branch from 3f09edf to 5be47bc Compare January 28, 2026 03:30
@yisibl yisibl merged commit 6d2e209 into main Jan 28, 2026
37 checks passed
@yisibl yisibl deleted the refactor-crop_by_bbox branch January 28, 2026 06:47
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