Skip to content

feat: add browser-side image optimization pipeline + superadmin toggle - #71

Open
ashishkushwaha5055 wants to merge 1 commit into
vicharanashala:mainfrom
ashishkushwaha5055:image-optimization-pipeline
Open

feat: add browser-side image optimization pipeline + superadmin toggle#71
ashishkushwaha5055 wants to merge 1 commit into
vicharanashala:mainfrom
ashishkushwaha5055:image-optimization-pipeline

Conversation

@ashishkushwaha5055

Copy link
Copy Markdown
  • 6-step pipeline: load → shrink to 1800px → grayscale → filter chain (grayscale(1) brightness(0.92) contrast(2.8) brightness(1.12)) → JPEG q=0.82 → recursive size guard (-200px per iter, floor 1000px)
  • localStorage toggle (default ON) + React hook
  • Silent integration in IcrScanner: 'Upload Completed Sheet Photo' replaces the simulated scan; pipeline runs in background, processed blob stashed for future OCR upload
  • Superadmin System Settings card: pipeline stage

Typical result: 1.5-4 MB raw photo -> 150-350 KB optimized. Processed images are kept in memory only and never persisted.

- 6-step pipeline: load → shrink to 1800px → grayscale → filter chain (grayscale(1) brightness(0.92) contrast(2.8) brightness(1.12)) → JPEG q=0.82 → recursive size guard (-200px per iter, floor 1000px)
- localStorage toggle (default ON) + React hook
- Silent integration in IcrScanner: 'Upload Completed Sheet Photo' replaces the simulated scan; pipeline runs in background, processed blob stashed for future OCR upload
- Superadmin System Settings card: runtime toggle + pipeline stages + raw-vs-optimized size estimates

Typical result: 1.5-4 MB raw photo -> 150-350 KB optimized. Processed images are kept in memory only and never persisted.
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