Skip to content

Add parameterized image processing (resize, crop, blur, adjustments)#38

Open
codeinaire wants to merge 1 commit into
mainfrom
parameterized-image-processing
Open

Add parameterized image processing (resize, crop, blur, adjustments)#38
codeinaire wants to merge 1 commit into
mainfrom
parameterized-image-processing

Conversation

@codeinaire
Copy link
Copy Markdown
Owner

Summary

  • Adds a new Rust processing module with 10 parameterized operations (resize, resize_exact, thumbnail, crop, blur, fast_blur, unsharpen, brighten, contrast, hue_rotate) with full parameter validation
  • Extends the decode-transform-encode pipeline with a processing step, exposed via new WASM exports (process_and_convert, decode_rgba_with_processing, preview_operations)
  • Adds an inline EditPanel UI with collapsible Resize, Crop, and Adjustments sections, matching the cyberpunk theme
  • Implements low-resolution preview mode (400px thumbnails with 300ms debounce) for interactive parameter adjustment
  • Full test coverage: 39 Rust unit tests + 22 TypeScript unit tests, all passing

Test plan

  • All existing tests pass (160 Rust + 101 TS unit tests)
  • Cargo clippy, cargo fmt, npm run check:all all pass clean
  • Frontend production build succeeds
  • Manual: load image, enable resize, verify aspect ratio lock works
  • Manual: adjust brightness/contrast/blur sliders, verify preview updates
  • Manual: convert with operations applied, download result
  • Manual: verify WebP output path works with processing operations

🤖 Generated with Claude Code

…ontrast, hue rotate)

Extends the Rust WASM library with a new processing module supporting
resize, crop, blur, fast blur, unsharpen, brighten, contrast, and hue
rotate operations. Exposes these through new WASM exports, worker
protocol, and a frontend EditPanel with live preview.

- New Rust processing module with 10 operation types and validation
- Pipeline integration via convert_with_processing and decode_rgba_with_processing
- WASM exports: process_and_convert, decode_rgba_with_processing, preview_operations
- TypeScript types, worker handlers, and ImageConverter.processImage API
- useProcessing hook for state management with aspect ratio lock
- EditPanel component with collapsible Resize/Crop/Adjustments sections
- Reusable Slider component with cyberpunk styling
- Low-res preview mode (400px thumbnail) with 300ms debounce
- 39 Rust unit tests + 22 TypeScript unit tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rust-image-tools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 02568c1
Status: ✅  Deploy successful!
Preview URL: https://ab12259d.rust-image-tools.pages.dev
Branch Preview URL: https://parameterized-image-processi.rust-image-tools.pages.dev

View logs

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.

1 participant