Repository navigation
Add image resizing - #37
Merged
leerob merged 5 commits intoDec 28, 2025
Merged
Conversation
Implements image resizing functionality with three algorithms: - Nearest neighbor: fastest, pixelated results (good for pixel art) - Bilinear: fast, smooth results (good balance) - Lanczos3: highest quality, slower (best for photographs) Features: - Full support for all color types (Gray, GrayAlpha, RGB, RGBA) - Buffer reuse API via resize_into() - WASM bindings via resizeImage() function - Comprehensive test coverage Also pins image and imagequant dev-dependencies to avoid edition2024 compatibility issues with older Cargo versions.
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Regenerate WASM binary with resize support (149 KB, -0.1% from 152 KB) - Update codebase-size-comparison.md with new metrics: - Total LOC: 33,113 → 34,268 (+1,155) - Core Code: 16,586 → 16,861 (+275) - Test Code: 16,527 → 17,407 (+880) - Test ratio: 49.9% → 50.8% (improved) - Test functions: 818 → 839 (+21) - Add resizeImage() export to WASM TypeScript definitions
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot.
You can kick off a cloud agent using @cursor - e.g. @cursor fix the bug in pixo.d.ts.
This branch was successfully deployed
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.
Add image resizing functionality with Nearest, Bilinear, and Lanczos3 algorithms, including WASM bindings, to allow for efficient image resolution changes.
Note
Adds high-quality image resizing as a preprocessing step before encoding, with APIs, bindings, and UI.
src/resize.rsprovidingResizeAlgorithm(Nearest/Bilinear/Lanczos3) andresize/resize_intofor allColorTypes; exported viapub mod resizeandResizeAlgorithminlib.rsresizeImageadded insrc/wasm.rs(plus JS/TS bindings inweb/src/lib/pixo-wasm/*) to resize raw pixels in-browserresizeImageand helpers inweb/src/lib/wasm.ts(includingcalculateResizeDimensions); Svelte UI adds Resize toggle, width/height inputs, aspect lock, algorithm select, and "Resize" action integrating with compression flowdocs/codebase-size-comparison.mdupdated (WASM size, test counts, features)image = 0.25.5,imagequant = 4.3.3); numerous unit tests for resize and wasm pathsWritten by Cursor Bugbot for commit 85cae7e. This will update automatically on new commits. Configure here.