Commit Graph
461 Commits
Author SHA1 Message Date
Siddharth Kumar Sah f2e17d2d44 fix(upscale): overhaul UI, fix AI pipeline bugs, add format support
- Replace Auto/AI/Fast buttons with Fast/Balanced/Best (consistent with other tools)
- Rename "Denoise" to "Noise Reduction" with explanatory subtitle
- Change output format from 3 buttons to dropdown with all formats (PNG, JPG, WebP, AVIF, TIFF, GIF, HEIC, HEIF)
- Add HEIC/HEIF input decoding (was missing unlike other tools)
- Add HEIC/HEIF/AVIF output conversion via Sharp and heif-enc
- Generate browser-compatible WebP preview for non-previewable output formats
- Fix torchvision compatibility shim so Real-ESRGAN actually loads (was silently falling back to Lanczos)
- Fix denoise crash: Image.fromarray() instead of type(img).fromarray()
- Redirect stdout for entire AI pipeline to prevent library messages corrupting JSON output
- Add GFPGAN model download for face enhancement
- Use batch endpoint for multi-file uploads (enables Download All ZIP)
2026-04-12 21:22:55 +08:00
stirling-imageandGitHub ed5f71e2fc Merge pull request #48 from stirling-image/fix/upscale-bugs-and-features
feat: overhaul upscale with bug fixes and advanced features
2026-04-12 19:09:22 +08:00
stirling-imageandGitHub d179021203 Merge pull request #47 from stirling-image/feat/ocr-overhaul
feat: OCR overhaul with three quality tiers and preprocessing
2026-04-12 19:07:29 +08:00
Siddharth Kumar Sah fe376aebd2 feat: overhaul upscale with bug fixes and advanced features
- Fix multi-image: process selected file, not always first
- Fix progress bar: asymptotic fill prevents visual stalling
- Fix slider: write results to captured index, not current selection
- Add model selection (Auto/AI/Fast), face enhancement, denoise
- Add output format (PNG/JPEG/WebP) with quality control
- Add Upscale All for sequential batch processing with queue
- More granular Python progress stages for smoother UX
2026-04-12 19:04:23 +08:00
Siddharth Kumar Sah e5bf3ccfc1 fix(ocr): address code review issues
- Fix temp file leak: clean up preprocessed image in finally block
- Log warning instead of silently swallowing preprocessing failures
- Simplify auto_detect_language to honest default (was a stub that
  wasted time loading a model but always returned "en")
2026-04-12 18:46:03 +08:00
Siddharth Kumar Sah fa3451631c test(ocr): add integration tests for quality tiers and backward compat 2026-04-12 18:42:08 +08:00
Siddharth Kumar Sah 958691b53d test(ocr): add E2E tests for OCR overhaul 2026-04-12 18:40:10 +08:00
Siddharth Kumar Sah df94d7674d feat(ocr): update i18n description 2026-04-12 18:39:12 +08:00
Siddharth Kumar Sah 28ee147cc7 feat(ocr): upgrade PaddleOCR to v3.x with PP-OCRv5 and VL model in Docker 2026-04-12 18:38:40 +08:00
Siddharth Kumar Sah 2d9ec4e258 feat(ocr): rewrite UI with quality tiers, enhance toggle, editable results, download 2026-04-12 18:37:09 +08:00
Siddharth Kumar Sah 864145f4b1 feat(ocr): update API route with quality tiers and backward compat 2026-04-12 18:34:50 +08:00
Siddharth Kumar Sah 4235875f78 feat(ocr): update TypeScript bridge for quality tiers 2026-04-12 18:34:47 +08:00
Siddharth Kumar Sah 49b9bcecfe feat(ocr): add PP-OCRv5 and PaddleOCR-VL quality tiers with preprocessing 2026-04-12 18:32:17 +08:00
Siddharth Kumar Sah 21c871d501 feat(ocr): add OpenCV preprocessing pipeline for OCR 2026-04-12 18:30:00 +08:00
Siddharth Kumar Sah 3345cb266a feat: add Ultra quality mode with BiRefNet-matting, rename quality tiers
Ultra quality (People only):
- BiRefNet-matting ONNX (928MB) for true alpha matting with per-pixel
  transparency on hair wisps and fine edges
- Custom rembg session class, zero new Python dependencies
- Model pre-downloaded in Docker build for immediate availability

Quality tier labels: Fast / HD / Max / Ultra (shorter, fits 4-col grid)
2026-04-12 18:23:09 +08:00
Siddharth Kumar Sah 7995d13c81 fix: rename quality tiers to Fast/HD/Max/Ultra, fix linter-broken hook
- Renamed quality labels: Balanced->HD, Best->Max (shorter, fits 4-col grid)
- Fixed use-tool-processor.ts references broken by linter reformatting
2026-04-12 18:20:54 +08:00
Siddharth Kumar Sah 93dd37017c feat: add Ultra quality mode with BiRefNet-matting for people photos
Adds a new "Ultra" quality tier for People subject type that uses
BiRefNet-matting (ONNX, 928MB) for true alpha matting instead of
binary segmentation. Produces per-pixel transparency for hair wisps
and fine edges that standard models miss.

- Custom rembg session class loads BiRefNet-matting ONNX from GitHub releases
- Zero new Python dependencies (reuses existing onnxruntime)
- Model pre-downloaded in Docker build alongside existing models
- Ultra option only visible when subject is People
- Falls back to Best when switching to Products/General
2026-04-12 18:09:59 +08:00
Siddharth Kumar Sah 6c58f12262 feat: overhaul remove-background with effects pipeline, consolidate color tools
Remove Background:
- Two-phase flow: AI removes bg once, then effects adjust instantly
- Blur background effect with real-time CSS preview (portrait mode)
- Drop shadow effect with opacity control
- Gradient backgrounds with presets, custom colors, and angle
- Custom background image upload (including HEIC/HEIF)
- Solid color backgrounds moved from Python to Node.js/Sharp
- Effects-only API endpoint for instant re-renders without AI re-run
- HEIC/HEIF input support (decoded before passing to Python/rembg)
- Passport/ID photo checkbox defaults ON for People subject
- Before/after slider preserved when no effects active
- 15 comprehensive Playwright e2e tests

Color Tools:
- Consolidated 4 tools (brightness-contrast, saturation, color-channels,
  color-effects) into single "Adjust Colors" tool
- Added exposure, temperature, tint, hue, sharpness controls
- SVG filter-based live preview for all adjustments
- Backward-compatible URL redirects from old tool paths

Other fixes:
- Favicon tool: download button instead of auto-download
- Batch processing: HEIC filename extension fix
- File store: processedFilename field for proper batch downloads
2026-04-12 17:53:16 +08:00
Siddharth Kumar Sah dde70f70ad feat: comprehensive HEIC/HEIF support and edit-metadata ExifTool overhaul
- Add ensureSharpCompat() helper for automatic HEIC detection and decode
- Fix HEIC support in all 14 custom-route tools (image-to-pdf, split,
  barcode-read, compose, collage, stitch, compare, find-duplicates,
  color-palette, watermark-image, vectorize, favicon, info, branding)
- Fix PdfPagePreview using store's decoded blobUrl instead of raw File
- Add onError fallback in ImageViewer for unrenderable formats
- Fix image-to-pdf progress bar with flushSync for reliable rendering
- Add ExifTool backend for edit-metadata (GPS, keywords, IPTC, dates)
- Rename Strip Metadata to Remove Metadata with interactive Leaflet map
- Fix user-files thumbnail generation for stored HEIC files
- Fix info tool stats() histogram for HEIC via decoded buffer
- Skip HEIC preprocessing in batch route for metadata tools
2026-04-12 08:50:19 +08:00
Siddharth Kumar Sah 6f5283019b feat: full HEIF/HEIC support, content-aware resize performance fix, UI improvements
- Add bidirectional HEIF support: decode (input) and encode (output) via system heif-convert/heif-enc
- Add server-side WebP preview generation for non-browser-previewable formats (HEIC, TIFF)
- Fix content-aware resize failing on HEIF input (decode before passing to caire)
- Fix content-aware resize timeout on large images by downscaling to max 1200px and using JPEG intermediate
- Add HEIF as target format in convert tool
- Add loading spinner for HEIF preview decode in file store
- Fix file picker not accepting HEIF files (explicit .heic,.heif,.hif extensions)
- Extend frontend timeout for medium tools to 180s with 45s progress animation
- Redesign rotate controls with preset buttons and compact flip section
- Remove misleading savings percentage from convert tool
2026-04-11 23:27:44 +08:00
stirling-imageandGitHub e0869477d4 Merge pull request #42 from stirling-image/feat/caire-content-aware-resize
feat: replace Python seam carving with caire Go binary
2026-04-11 17:50:35 +08:00
Siddharth Kumar Sah 1707521f3a feat: replace Python seam carving with caire Go binary
Replace the Python seam-carving library with caire (esimov/caire v1.5.0),
a Go-based content-aware resize engine that is faster and supports both
shrinking and enlarging via seam insertion.

- Add Go builder stage in Dockerfile to compile caire from source
- Rewrite seam-carving.ts to call caire via execFile (no Python sidecar)
- Remove content-aware-resize from PYTHON_SIDECAR_TOOLS (60s timeout)
- Add new options: blur radius, edge sensitivity, square mode, face detection
- Move content-aware toggle below standard resize in UI (subtler placement)
- Rename "Don't enlarge" to "Limit to original size" with hover tooltip
- Add smooth progress bar for medium-duration tools
- Delete seam_carve.py and remove seam-carving pip dependency
- Update integration tests and visual regression screenshots
2026-04-11 17:49:28 +08:00
Siddharth Kumar Sah b8227c45b9 feat(crop): improve UI and fix batch crop for multi-file
- Replace Rule of Thirds button with checkbox for clearer toggle
- Show side-by-side comparison after crop instead of overlay slider
- Add custom aspect ratio option with W:H number inputs
- Fix batch crop failing on files with different dimensions by
  sending percentage-based coordinates instead of absolute pixels
- Add failed-file error state display in tool page
2026-04-11 14:47:46 +08:00
Siddharth Kumar Sah 6c1a347f1c feat: add LOG_LEVEL env var and improve error messages
Add configurable LOG_LEVEL (fatal/error/warn/info/debug/trace) for
Fastify logger. Always return error details in tool processing
responses and combine error + details in frontend display.
2026-04-11 14:47:30 +08:00
Siddharth Kumar Sah f2696443dc Merge branch 'main' of https://github.com/stirling-image/stirling-image 2026-04-10 23:02:47 +08:00
Siddharth Kumar Sah bbae319333 Merge branch 'refactor/remove-lite-variant' 2026-04-10 22:36:39 +08:00
semantic-release-bot 2ac7b6875b chore(release): 1.14.0 [skip ci]
# [1.14.0](https://github.com/stirling-image/stirling-image/compare/v1.13.0...v1.14.0) (2026-04-10)

### Bug Fixes

* add FILES_STORAGE_PATH to Dockerfile ENV to prevent data loss ([b575243](https://github.com/stirling-image/stirling-image/commit/b575243e9a0cb2ac4567d785a74e57dea912e9e2))
* add shutdown timeout and improve health endpoint ([986ad37](https://github.com/stirling-image/stirling-image/commit/986ad37bb5e6644dd93521018a1bcd2d6243f502))
* address code review findings before merge ([caf65bc](https://github.com/stirling-image/stirling-image/commit/caf65bc4697ddfea27674b56fd2e8de847edc734))
* correct PaddleOCR language codes for model download and OCR ([e1ee571](https://github.com/stirling-image/stirling-image/commit/e1ee57103c201f104b737c2719d0014d4912d4b2))
* force CPU mode in download_models.py for build-time compatibility ([b4b59a7](https://github.com/stirling-image/stirling-image/commit/b4b59a7500375bc2e65cb0050e5308b07610d2cf))
* handle paddlepaddle-gpu CUDA import at build time gracefully ([0083a74](https://github.com/stirling-image/stirling-image/commit/0083a741a9a3924ccc37c4e622c2980a8a41f1a3))
* install cuda-compat stubs for build-time PaddlePaddle import ([d31d665](https://github.com/stirling-image/stirling-image/commit/d31d66556ef0aa7c20a73a94f5d95b54b99fbb8a))
* load RealESRGAN pretrained weights for actual AI upscaling ([fa9569c](https://github.com/stirling-image/stirling-image/commit/fa9569c920d6bdac094dcd661fc5cf3b4be3f17a))
* revert to npx tsx in CMD for pnpm compatibility ([e55253d](https://github.com/stirling-image/stirling-image/commit/e55253dee03f9e93187d50e0ffb66b423a1230c0))
* simplify smoke test to CPU-only imports for build-time compat ([3481663](https://github.com/stirling-image/stirling-image/commit/34816639609cbccab91a5cad5760fea769c4b565))
* skip RealESRGAN import check on arm64 in smoke test ([1e2ef52](https://github.com/stirling-image/stirling-image/commit/1e2ef5284686253ae33e05411a515369b7f41a3e))
* split paddlepaddle-gpu and paddleocr installs, use --extra-index-url ([74183e8](https://github.com/stirling-image/stirling-image/commit/74183e8dc1e3d8f90cff4484f5526c3c3dfba9a6))
* suppress ML library stdout noise in ocr.py and upscale.py ([c0b419d](https://github.com/stirling-image/stirling-image/commit/c0b419de21acb92b243ef78191dff6a2153c5961))
* use PaddlePaddle GPU package index for CUDA wheels ([dd9528f](https://github.com/stirling-image/stirling-image/commit/dd9528f53c9bcf148842ab94f14a4ebd5ae223ec))
* use platform-specific mediapipe version for arm64 compatibility ([7face19](https://github.com/stirling-image/stirling-image/commit/7face19238f54cfea02d453b697e34b50ccd9d21))

### Features

* expand model pre-download with verification and smoke test ([a9e3b96](https://github.com/stirling-image/stirling-image/commit/a9e3b9688776a51efd2f42cae810de425cf1d9cf))
* simplify CI to single unified Docker build ([b385a2e](https://github.com/stirling-image/stirling-image/commit/b385a2eabb255f7a8fe2d3720a358ff5bf254310))
* simplify compose to single file, add log rotation ([84f7057](https://github.com/stirling-image/stirling-image/commit/84f7057a49850b7a47440099ec2caad8d3b87efe))
* unified Docker image with GPU auto-detection ([6c3eb3b](https://github.com/stirling-image/stirling-image/commit/6c3eb3b876cee0301d5fb3ed8324a3c8e92b1307))
v1.14.0
2026-04-10 14:13:37 +00:00
Siddharth Kumar Sah 9ae15e43d2 Merge branch 'main' of https://github.com/stirling-image/stirling-image 2026-04-10 22:13:02 +08:00
Siddharth Kumar Sah e1dec040f4 Merge branch 'feat/unified-docker-image' 2026-04-10 21:58:23 +08:00
semantic-release-bot aa4e5cac8d chore(release): 1.13.0 [skip ci]
# [1.13.0](https://github.com/stirling-image/stirling-image/compare/v1.12.0...v1.13.0) (2026-04-10)

### Bug Fixes

* complete RBAC implementation lost during merge ([cc8a272](https://github.com/stirling-image/stirling-image/commit/cc8a27239b02a63ca88abc3e363c8a46f89674e8))

### Features

* add backend permission map and requirePermission middleware ([1a99571](https://github.com/stirling-image/stirling-image/commit/1a995711535a1525e709cdd7bff75361f457e942))
* add permission checks and admin override to API key routes ([d776680](https://github.com/stirling-image/stirling-image/commit/d776680f2d2342e35b84821792d6c24ae7e0ffbc))
* add permission checks and admin override to pipeline routes ([59f40db](https://github.com/stirling-image/stirling-image/commit/59f40dbfd4a97f8691b5fbbf6d338063c389987b))
* add permission checks and ownership scoping to user-files routes ([86ba698](https://github.com/stirling-image/stirling-image/commit/86ba69825a1dd87c9f868d79cd806b7d594cce1b))
* add shared Permission and Role types ([2f594e9](https://github.com/stirling-image/stirling-image/commit/2f594e96057c72bf107f3012426e87af5f97eb94))
* add tools:use permission check to tool, batch, pipeline, and upload routes ([885ace5](https://github.com/stirling-image/stirling-image/commit/885ace54f09b3301989f8aa404c15f60e19c054d))
* extend useAuth hook with role and permissions from session ([e0ba8be](https://github.com/stirling-image/stirling-image/commit/e0ba8be7b3211299c8cde90b2d22e7796eee2206))
* filter settings tabs by user permissions, remove admin fallback ([bcbd24a](https://github.com/stirling-image/stirling-image/commit/bcbd24a2395b93b64dbbf638ba0138f9ec9ba9da))
* include permissions and teamName in login/session responses ([4943177](https://github.com/stirling-image/stirling-image/commit/49431772ec6a02eae8aced48da92ef87a6c89afb))
* replace requireAdmin with requirePermission on all routes ([af7f57d](https://github.com/stirling-image/stirling-image/commit/af7f57d52f49c8f8412876639076084c96eba284))
v1.13.0
2026-04-10 13:26:01 +00:00
Siddharth Kumar Sah cc8a27239b fix: complete RBAC implementation lost during merge
Several RBAC features from feat/rbac-permissions were silently lost
during the merge into main. This restores and completes them:

- Add permissions and teamName to login/session API responses
- Export Permission and Role types from shared package
- Filter settings tabs by user permissions in frontend
- Extend useAuth hook with role, permissions, and hasPermission
- Restrict teams listing to admin only
- Add admin override for API keys, files, and pipelines listing
- Add ownership scoping to file access, download, and delete routes
- Register userFileRoutes in integration test server
- Mock auth import in unit permissions test to avoid SQLite lock
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 6c6fb113fa test: add e2e tests for role-based settings tab visibility and API access 2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah bcbd24a239 feat: filter settings tabs by user permissions, remove admin fallback 2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah e0ba8be7b3 feat: extend useAuth hook with role and permissions from session 2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 59f40dbfd4 feat: add permission checks and admin override to pipeline routes
Replace requireAuth with requirePermission("pipelines:own") on pipeline
save/list/delete routes. Admin users with pipelines:all can see and
delete all pipelines. Unauthorized delete returns 404 to avoid leaking
resource existence.
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 86ba69825a feat: add permission checks and ownership scoping to user-files routes
Replace getAuthUser (optional auth) with requirePermission("files:own") on all
user-files routes, enforcing mandatory authentication and ownership checks.
Admin users with files:all permission bypass ownership restrictions. Returns 404
(not 403) for ownership failures to avoid leaking resource existence.
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah d776680f2d feat: add permission checks and admin override to API key routes
Replace requireAuth with requirePermission(apikeys:own). Admin users
with apikeys:all can see and delete any user's keys.
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah af7f57d52f feat: replace requireAdmin with requirePermission on all routes
Migrate settings, teams, branding, and user management routes to use
the new permission-based authorization system. Remove requireAdmin
function entirely.
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 885ace54f0 feat: add tools:use permission check to tool, batch, pipeline, and upload routes 2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 49431772ec feat: include permissions and teamName in login/session responses 2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 1a99571153 feat: add backend permission map and requirePermission middleware
Create the RBAC permission module that maps roles to permissions and
provides a requirePermission middleware to replace requireAdmin. Update
the test server to use requirePermission for the admin health check.
2026-04-10 21:25:30 +08:00
Siddharth Kumar Sah 2f594e9605 feat: add shared Permission and Role types 2026-04-10 21:25:29 +08:00
semantic-release-bot e8bad0e67b chore(release): 1.12.0 [skip ci]
# [1.12.0](https://github.com/stirling-image/stirling-image/compare/v1.11.0...v1.12.0) (2026-04-10)

### Bug Fixes

* **a11y:** add keyboard support to pdf-to-image upload dropzone ([1778f72](https://github.com/stirling-image/stirling-image/commit/1778f7266b9837a07b20f167e82e1e9b163086b7))
* use specific selector in pdf-to-image e2e test ([b2a2c89](https://github.com/stirling-image/stirling-image/commit/b2a2c890a1d25f60e392e6a2df23e1600cc3ad8d))

### Features

* add pdf-to-image backend route with info and processing endpoints ([30155c1](https://github.com/stirling-image/stirling-image/commit/30155c1c7073c55290d4f662f7f93779cc4512b7))
* add pdf-to-image frontend settings component ([44bbfba](https://github.com/stirling-image/stirling-image/commit/44bbfba80dfb3eb069c563e5ca691a0f8dce1eea))
* register pdf-to-image in frontend tool registry ([5fd294c](https://github.com/stirling-image/stirling-image/commit/5fd294c994e7df076c4de0016f62d952a161345b))
* register pdf-to-image tool in shared constants and i18n ([43324c1](https://github.com/stirling-image/stirling-image/commit/43324c1f23e3f278c89fa301d5a0275b12f587e7))
* unified Docker image with GPU auto-detection ([#37](https://github.com/stirling-image/stirling-image/issues/37)) ([b0083e2](https://github.com/stirling-image/stirling-image/commit/b0083e2b083d0bf52b6a576f7ef67fbff0cc8cbe))
v1.12.0
2026-04-10 12:56:42 +00:00
Siddharth Kumar Sah 1778f7266b fix(a11y): add keyboard support to pdf-to-image upload dropzone 2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah b2a2c890a1 fix: use specific selector in pdf-to-image e2e test
The getByText("3 pages") matched multiple elements including the
convert button. Scope the selector to the file info area.
2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah cab6772dab test: add e2e test for pdf-to-image tool 2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah 5fd294c994 feat: register pdf-to-image in frontend tool registry 2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah 48cf919fb7 test: add integration tests for pdf-to-image endpoints 2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah 44bbfba80d feat: add pdf-to-image frontend settings component 2026-04-10 20:56:13 +08:00
Siddharth Kumar Sah 30155c1c70 feat: add pdf-to-image backend route with info and processing endpoints 2026-04-10 20:56:13 +08:00