Skip to content

fix: simplify resize percentage calculations#388

Merged
jcbsfilho merged 1 commit into1.20.xfrom
fix/image-resize-v3
Feb 13, 2026
Merged

fix: simplify resize percentage calculations#388
jcbsfilho merged 1 commit into1.20.xfrom
fix/image-resize-v3

Conversation

@jcbsfilho
Copy link
Collaborator

This pull request makes adjustments to the image resizing logic and response handling in the packages/wasm-image-processor/src/index.ts file. The most significant change is a fix to the calculation of resize percentages, ensuring more accurate image resizing. Additionally, the response generation is updated to bypass TypeScript type checks for compatibility.

Image resizing logic improvements:

  • Fixed the calculation of resize percentages in the resize function by removing unnecessary multiplication and division by 100, resulting in more accurate resizing. (resize in packages/wasm-image-processor/src/index.ts)

Response handling adjustments:

  • Added @ts-ignore to the response creation in getImageResponse to bypass TypeScript type checks, likely to address type compatibility issues with the response object. (getImageResponse in packages/wasm-image-processor/src/index.ts)

- simplify resize percentage calculations by removing redundant multiplications
@jcbsfilho jcbsfilho requested a review from a team as a code owner February 13, 2026 13:52
@jcbsfilho jcbsfilho merged commit e48bd14 into 1.20.x Feb 13, 2026
3 checks passed
@jcbsfilho jcbsfilho deleted the fix/image-resize-v3 branch February 13, 2026 17:05
pablodiehl pushed a commit that referenced this pull request Feb 13, 2026
[skip ci]
## <small>1.20.21 (2026-02-13)</small>

* fix: simplify resize percentage calculations (#388) ([e48bd14](e48bd14)), closes [#388](#388)
@pablodiehl
Copy link
Collaborator

🎉 This PR is included in version 1.20.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Development

Successfully merging this pull request may close these issues.

3 participants