Commit Graph
342 Commits
Author SHA1 Message Date
Siddharth Kumar Sah 7fba05e1dc feat: extract shared metadata parsing utilities into image-engine
Move sanitizeValue, parseExif, parseGps, parseXmp into the shared
image-engine package so both strip-metadata and edit-metadata can
reuse them. Includes 13 unit tests covering all four functions.
2026-04-06 19:12:56 +08:00
Siddharth Kumar Sah 723c79491e feat: add EditMetadataOptions type and exif-reader dep to image-engine 2026-04-06 19:09:18 +08:00
Siddharth Kumar Sah ec2010fa7b test: add JPEG fixture with known EXIF data for edit-metadata tests 2026-04-06 19:08:18 +08:00
Siddharth Kumar Sah 9afea7b985 docs: add implementation plan for edit metadata tool
12-task plan covering: test fixture, image-engine types + parsing + operation,
strip-metadata refactor, API route, shared constants/i18n, shared UI
extraction, edit-metadata component, e2e tests, and Docker verification.
2026-04-06 19:05:13 +08:00
Siddharth Kumar Sah b133a713a7 docs: add design spec for edit metadata tool
Design spec for new edit-metadata tool (issue #15). Covers common EXIF
field editing, GPS clearing, granular per-field stripping, and shared
metadata infrastructure extracted from strip-metadata.
2026-04-06 18:55:25 +08:00
stirling-imageandGitHub 9e9a22cdd1 Update README.md 2026-04-06 15:24:42 +08:00
semantic-release-bot 48c803acfa chore(release): 1.7.4 [skip ci]
## [1.7.4](https://github.com/stirling-image/stirling-image/compare/v1.7.3...v1.7.4) (2026-04-06)

### Bug Fixes

* batch file ordering and format preservation for image tools ([#20](https://github.com/stirling-image/stirling-image/issues/20)) ([5d85562](https://github.com/stirling-image/stirling-image/commit/5d8556254f0684de7c3a1a177a28f8d1e0818cd3)), closes [#13](https://github.com/stirling-image/stirling-image/issues/13) [#14](https://github.com/stirling-image/stirling-image/issues/14)
v1.7.4
2026-04-06 04:54:19 +00:00
5d8556254f fix: batch file ordering and format preservation for image tools (#20)
* feat: add resolveOutputFormat utility for input format preservation

* fix: preserve file order in batch processing with X-File-Results header

Collect all results before streaming the ZIP to guarantee upload order.
Replace X-File-Order with index-based X-File-Results header that maps
each upload index to its processed filename, handling failures and
duplicate filenames correctly.

Closes #13

* fix: use X-File-Results for index-based batch file matching

The frontend now matches processed files to entries by upload index
instead of fragile name/position matching.

* feat: preserve input format in smart-crop with quality control

Smart crop now outputs in the same format as the input (JPG in, JPG out)
instead of always converting to PNG. Adds an optional quality setting
(default 95) for lossy formats.

Closes #14

* feat: add output quality slider to smart crop settings UI

* feat: preserve input format in crop tool

* feat: preserve input format in color adjustment tools

Applies to brightness-contrast, saturation, color-channels, and
color-effects tool routes.

* refactor: avoid double encode in smart-crop content mode

For the simple trim path (no pad-to-square), chain .toFormat() on the
trim pipeline directly instead of creating a second Sharp instance.
This eliminates a redundant intermediate encode that degraded quality
for lossy formats. Also use trimmed.info dimensions instead of a
separate metadata() call for the pad-to-square path.

---------

Co-authored-by: Siddharth Kumar Sah <siddharth123sk@gmail.com>
2026-04-06 12:53:53 +08:00
Siddharth Kumar Sah fe80287cb4 docs: replace localhost links with generic path references in API docs
Clickable localhost:1349 links are misleading on the GitHub Pages site
since users may not have Stirling Image running locally. Use plain path
references instead so it is clear these live on their own instance.
2026-04-06 11:33:50 +08:00
semantic-release-bot 2eb74f242e chore(release): 1.7.3 [skip ci]
## [1.7.3](https://github.com/stirling-image/stirling-image/compare/v1.7.2...v1.7.3) (2026-04-06)

### Bug Fixes

* **docs:** correct broken llms.txt links on REST API page ([b46d250](https://github.com/stirling-image/stirling-image/commit/b46d2504e17d06b075964e063de19529a42bc363))
v1.7.3
2026-04-06 03:30:11 +00:00
Siddharth Kumar Sah b46d2504e1 fix(docs): correct broken llms.txt links on REST API page
The links used /Stirling-Image/ (wrong casing) which VitePress then
prefixed with the base /stirling-image/, producing a double-prefixed
404 path. Remove the manual base so VitePress prepends it automatically.
2026-04-06 11:27:17 +08:00
stirling-imageandGitHub c9124fbece Update README.md 2026-04-06 10:38:38 +08:00
Siddharth Kumar Sah b3fec73e61 docs: restore code blocks in collapsible variants for copy button 2026-04-06 00:31:36 +08:00
Siddharth Kumar Sah 700575adc8 docs: improve collapsible variants section in README
Use a table for cleaner layout. Add image sizes and CUDA prereq note.
2026-04-06 00:28:54 +08:00
Siddharth Kumar Sah acde7af08a docs: collapse lite/cuda variants in README quick start
Keep the main docker run command front and center. Lite and CUDA
variants are in a collapsible details block so the quick start
section stays scannable.
2026-04-05 23:46:27 +08:00
semantic-release-bot 42525db6dc chore(release): 1.7.2 [skip ci]
## [1.7.2](https://github.com/stirling-image/stirling-image/compare/v1.7.1...v1.7.2) (2026-04-05)

### Bug Fixes

* use torch.cuda for GPU detection instead of onnxruntime providers ([8d2f401](https://github.com/stirling-image/stirling-image/commit/8d2f40151277c1e00a9ca20a6956e37d2c204d48))
v1.7.2
2026-04-05 14:24:35 +00:00
Siddharth Kumar Sah 8d2f401512 fix: use torch.cuda for GPU detection instead of onnxruntime providers
onnxruntime-gpu reports CUDAExecutionProvider as "available" just
because the library was compiled with CUDA support, even on machines
with no GPU. This made gpu_available() return True incorrectly,
causing upscale.py to try torch.device("cuda") and fall back to
Lanczos instead of running Real-ESRGAN on CPU.

torch.cuda.is_available() actually probes the hardware. Use it as
the single source of truth for GPU detection.

Verified: CUDA image on Apple Silicon (no GPU) now correctly reports
gpu: false and all AI tools run on CPU without crashes.
2026-04-05 22:24:16 +08:00
semantic-release-bot e8572358e9 chore(release): 1.7.1 [skip ci]
## [1.7.1](https://github.com/stirling-image/stirling-image/compare/v1.7.0...v1.7.1) (2026-04-05)

### Bug Fixes

* prevent false GPU detection when CUDA image runs without GPU ([a291d1f](https://github.com/stirling-image/stirling-image/commit/a291d1fe0ba6100f717441f346a6df77df7e8fdd))
v1.7.1
2026-04-05 14:04:25 +00:00
Siddharth Kumar Sah a291d1fe0b fix: prevent false GPU detection when CUDA image runs without GPU
The STIRLING_GPU=true env var was baked into the :cuda Dockerfile,
which made gpu_available() return True without checking actual
hardware. On machines without a GPU, this would crash upscale.py
(torch.device("cuda") fails) and ocr.py (PaddleOCR use_gpu=True).

Fix: the env var can only disable GPU (set to false/0), never
force-enable it. Hardware detection always runs. Removed the
baked env var from the Dockerfile since it adds no value now.
2026-04-05 22:03:57 +08:00
semantic-release-bot 609fd57de8 chore(release): 1.7.0 [skip ci]
# [1.7.0](https://github.com/stirling-image/stirling-image/compare/v1.6.0...v1.7.0) (2026-04-05)

### Bug Fixes

* **web:** skip empty Authorization header for forward-auth proxy compatibility ([d0c69d6](https://github.com/stirling-image/stirling-image/commit/d0c69d6a4670ce6ffa397d8b4432687ed9b4d395)), closes [#6](https://github.com/stirling-image/stirling-image/issues/6)

### Features

* add GPU/CUDA acceleration support (:cuda Docker tag) ([29a382e](https://github.com/stirling-image/stirling-image/commit/29a382e9e0eb1ce8a7d08e68c41443495a52d3f8))
v1.7.0
2026-04-05 12:36:40 +00:00
stirling-imageandGitHub 277b07d86c Merge pull request #12 from stirling-image/feat/gpu-cuda-support
feat: GPU/CUDA acceleration (:cuda Docker tag)
2026-04-05 20:36:12 +08:00
Siddharth Kumar Sah f1ae974de9 docs: add CUDA tag to README, getting-started, deployment, benchmarks
- README: add CUDA docker run example alongside full and lite
- Getting started: add GPU acceleration tip with speedup numbers
- Deployment: add CUDA row to variants table
- Docker tags: expand benchmarks with warm + cold start tables
2026-04-05 20:35:24 +08:00
Siddharth Kumar Sah 9381564269 docs: add CUDA/GPU documentation and benchmarks
- Add :cuda tag to Docker Tags docs with setup, benchmarks, compose example
- Add GPU acceleration tip to AI engine docs
- Include benchmark table from RTX 4070 testing
2026-04-05 20:04:04 +08:00
Siddharth Kumar Sah 29a382e9e0 feat: add GPU/CUDA acceleration support (:cuda Docker tag)
Add a :cuda Docker image tag that auto-detects NVIDIA GPU at runtime
and falls back gracefully to CPU. Same pattern as Immich.

- New gpu.py shared utility for cached CUDA detection
- Background removal (rembg): pass CUDAExecutionProvider to ONNX Runtime
- Upscaling (Real-ESRGAN): use CUDA device + FP16 when GPU available
- OCR (PaddleOCR): enable use_gpu when CUDA detected
- Dispatcher reports GPU status at startup via readiness signal
- Admin health endpoint exposes GPU availability
- Dockerfile uses ARG GPU=false with conditional NVIDIA CUDA base image
- docker-compose.gpu.yml override for GPU users
- CI/CD workflows build and publish :cuda tag (amd64 only)

Three tags: :latest (CPU), :lite (no AI), :cuda (GPU with CPU fallback)
2026-04-05 19:12:45 +08:00
Siddharth Kumar SahandJulian Nadeau d0c69d6a46 fix(web): skip empty Authorization header for forward-auth proxy compatibility
Centralize duplicated getToken() + Bearer header logic into a single
formatHeaders() helper in lib/api.ts. When no token exists, the
Authorization header is omitted entirely instead of sending an empty
Bearer token, which breaks forward-auth proxies like Authelia behind
Caddy.

Changes:
- Add formatHeaders() with try-catch around localStorage access
- Replace 20+ duplicated getToken() definitions across tool components
- Migrate all call sites including file-details, settings, change-password
- Update tests to verify header omission on empty token

Based on the fix proposed by @jules2689 in #6, with improvements:
file placement (lib/api.ts vs components), localStorage error handling,
simplified truthiness check, and complete call-site coverage.

Co-Authored-By: Julian Nadeau <julian@jnadeau.ca>
2026-04-05 18:41:06 +08:00
Siddharth Kumar Sah f21579c7a3 docs: fix license (MIT -> AGPLv3), add lite refs to llms.txt and ai.md
Both llms.txt and llms-full.txt incorrectly said MIT. Also added lite
variant mention to the description and a warning callout on the AI
engine docs page noting AI tools are unavailable in the lite image.
2026-04-05 08:03:29 +08:00
Siddharth Kumar Sah be45d3ca80 docs: add lite image references across all documentation
README Quick Start now shows both :latest and :lite commands.
Getting Started adds a tip callout about the lite image.
Deployment page lists both variants with a comparison table and
updates the CI/CD description to mention both are built.
Developer guide adds the lite build command.
2026-04-05 08:01:18 +08:00
Siddharth Kumar Sah 9974ea5c09 docs: add renaming vote banner and fix license badge
Static AGPLv3 badge replaces GitHub's auto-detected one, which
couldn't parse the dual-license preamble in the LICENSE file.
2026-04-05 00:59:19 +08:00
semantic-release-bot 30f36e6a5c chore(release): 1.6.0 [skip ci]
# [1.6.0](https://github.com/stirling-image/stirling-image/compare/v1.5.3...v1.6.0) (2026-04-04)

### Features

* lightweight Docker image without AI/ML tools (:lite tag) ([449a2fc](https://github.com/stirling-image/stirling-image/commit/449a2fc319e97cddfa71c29556e2d433dde78d6d)), closes [#1](https://github.com/stirling-image/stirling-image/issues/1)
v1.6.0
2026-04-04 16:23:46 +00:00
stirling-imageandGitHub 449a2fc319 feat: lightweight Docker image without AI/ML tools (:lite tag)
Closes #1
2026-04-05 00:23:21 +08:00
semantic-release-bot 51f10abb35 chore(release): 1.5.3 [skip ci]
## [1.5.3](https://github.com/stirling-image/stirling-image/compare/v1.5.2...v1.5.3) (2026-04-04)

### Bug Fixes

* use heif-convert for HEIC decoding on Linux ([98553ed](https://github.com/stirling-image/stirling-image/commit/98553ed6743e11ff9af8e6fc718ce550d33a7f54))
v1.5.3
2026-04-04 13:55:46 +00:00
Siddharth Kumar Sah 98553ed674 fix: use heif-convert for HEIC decoding on Linux
Linux libheif packages provide heif-convert instead of heif-dec (which
is macOS-only). The decoder now tries heif-convert first, then falls
back to heif-dec. Both accept the same argument syntax.
2026-04-04 21:55:19 +08:00
semantic-release-bot d2381af9cd chore(release): 1.5.2 [skip ci]
## [1.5.2](https://github.com/stirling-image/stirling-image/compare/v1.5.1...v1.5.2) (2026-04-04)

### Bug Fixes

* install HEVC codec plugins for CI HEIC tests ([8991cde](https://github.com/stirling-image/stirling-image/commit/8991cde0aba91ee50383eaf14ca0a80fcf45da55))
v1.5.2
2026-04-04 13:51:05 +00:00
Siddharth Kumar Sah 8991cde0ab fix: install HEVC codec plugins for CI HEIC tests
Ubuntu 24.04 uses plugin-based libheif codecs. Added libheif-plugin-x265
(HEVC encoder) and libheif-plugin-libde265 (HEVC decoder) to the CI test
job. Debian bookworm (Docker) bundles these in libheif1 directly.
2026-04-04 21:50:35 +08:00
semantic-release-bot 169fb41d57 chore(release): 1.5.1 [skip ci]
## [1.5.1](https://github.com/stirling-image/stirling-image/compare/v1.5.0...v1.5.1) (2026-04-04)

### Bug Fixes

* install libheif-examples in CI for HEIC tests ([f07454d](https://github.com/stirling-image/stirling-image/commit/f07454d349cc5029636aa95bac7d67f505133424))
v1.5.1
2026-04-04 13:41:45 +00:00
Siddharth Kumar Sah f07454d349 fix: install libheif-examples in CI for HEIC tests
The integration tests for HEIC conversion require heif-enc and heif-dec
CLI tools which are not available on ubuntu-latest by default.
2026-04-04 21:41:19 +08:00
semantic-release-bot cafe52d55d chore(release): 1.5.0 [skip ci]
# [1.5.0](https://github.com/stirling-image/stirling-image/compare/v1.4.0...v1.5.0) (2026-04-04)

### Features

* add HEIC/HEIF format support for input and output ([6717c17](https://github.com/stirling-image/stirling-image/commit/6717c17a26262f1e45037b4cb454df9400c5930e))
v1.5.0
2026-04-04 13:34:28 +00:00
Siddharth Kumar Sah 6717c17a26 feat: add HEIC/HEIF format support for input and output
Add bidirectional HEIC support using system libheif CLI tools (heif-enc/heif-dec)
for HEVC encoding/decoding, since Sharp's bundled libheif only supports AV1.

- HEIC input: all tools now accept iPhone HEIC photos via heif-dec pre-processing
- HEIC output: convert tool produces true HEIC (HEVC) via heif-enc
- Docker: adds libheif-examples package for heif-enc/heif-dec CLI tools
- Tests: full conversion matrix (7x7), unit tests, and Playwright e2e tests
- Docs: updated OpenAPI spec, image-engine docs, getting-started, llms-full.txt
2026-04-04 21:33:48 +08:00
semantic-release-bot 84283c16bd chore(release): 1.4.0 [skip ci]
# [1.4.0](https://github.com/stirling-image/stirling-image/compare/v1.3.1...v1.4.0) (2026-04-04)

### Features

* add "Crop to Content" mode to smart crop tool ([93ad7cd](https://github.com/stirling-image/stirling-image/commit/93ad7cdfc170717a980ba12a2d90e8e3a9109989)), closes [#7](https://github.com/stirling-image/stirling-image/issues/7)
v1.4.0
2026-04-04 11:50:22 +00:00
Siddharth Kumar Sah 93ad7cdfc1 feat: add "Crop to Content" mode to smart crop tool
Adds a new mode that trims uniform-color borders around the subject,
like GIMP's "Crop to Content." Includes configurable tolerance threshold
and optional pad-to-square with target size for e-commerce workflows.

The original attention-based crop is preserved as "Focus Crop" mode.

Closes #7
2026-04-04 19:49:49 +08:00
semantic-release-bot dba3f65d8c chore(release): 1.3.1 [skip ci]
## [1.3.1](https://github.com/stirling-image/stirling-image/compare/v1.3.0...v1.3.1) (2026-04-04)

### Bug Fixes

* default theme to light instead of following system preference ([30908ed](https://github.com/stirling-image/stirling-image/commit/30908ed058439f0cc8cc70976091083c260d6b05))
v1.3.1
2026-04-04 11:42:34 +00:00
Siddharth Kumar Sah 30908ed058 fix: default theme to light instead of following system preference
New users on dark-mode systems were seeing dark theme on first visit.
The default is now explicitly light, matching the API's DEFAULT_THEME.
Users can still switch to dark or system in settings.
2026-04-04 19:42:05 +08:00
semantic-release-bot bc2d9bcea1 chore(release): 1.3.0 [skip ci]
# [1.3.0](https://github.com/stirling-image/stirling-image/compare/v1.2.1...v1.3.0) (2026-04-04)

### Bug Fixes

* add XHR timeout to prevent UI spinning forever ([dae27f4](https://github.com/stirling-image/stirling-image/commit/dae27f4d559d873af13b683a7b64e273d752e057))
* disable worker pool to prevent Docker processing hang ([5cd2b86](https://github.com/stirling-image/stirling-image/commit/5cd2b864bd878c80990d7ce47050b8e777f333a3))
* log volume permission errors instead of swallowing them ([3642b7d](https://github.com/stirling-image/stirling-image/commit/3642b7d3b23649a2c65e8580cf760714fa725ff3))
* replace crypto.randomUUID with generateId in AI tool settings ([659081c](https://github.com/stirling-image/stirling-image/commit/659081c5686bfdee8f3155714fcdba712ad154ab))
* replace crypto.randomUUID with generateId in pipeline/automation ([b650dcd](https://github.com/stirling-image/stirling-image/commit/b650dcd79128d95e66f2f1f172805e22ffa97f0d))
* replace crypto.randomUUID with generateId in use-tool-processor ([7a5a753](https://github.com/stirling-image/stirling-image/commit/7a5a753a2d4e74a65b4852fdd2d8e96331706559))
* replace navigator.clipboard with copyToClipboard utility ([9f03543](https://github.com/stirling-image/stirling-image/commit/9f0354388f22a57e4562a76b9140d1dd604089f1))
* resolve multiple API and e2e test bugs ([9d62173](https://github.com/stirling-image/stirling-image/commit/9d621734c3a34d846a65210f43a7037c4fa4628a))
* restore navigator.clipboard and execCommand mocks in tests ([6b03a8b](https://github.com/stirling-image/stirling-image/commit/6b03a8b8bde9b36b2de2fe377703e45d40645868))

### Features

* add copyToClipboard() utility with execCommand fallback ([19ce303](https://github.com/stirling-image/stirling-image/commit/19ce303123a917595d670247afcfa0df2b64117a))
* add generateId() utility for non-secure context compatibility ([f61ab9f](https://github.com/stirling-image/stirling-image/commit/f61ab9f85cd5893742fe11cdd749f9c4330b13b3))
v1.3.0
2026-04-04 09:58:22 +00:00
Siddharth Kumar Sah 9d621734c3 fix: resolve multiple API and e2e test bugs
- Health endpoint returns "healthy" instead of "ok" for consistency
- MAX_USERS now configurable via env var (default 5)
- People API returns team names instead of UUIDs in register/list
- PUT user update accepts team names (name-first lookup, fallback to ID)
- Login rate limit follows global rate limit when RATE_LIMIT_PER_MIN > 1000
- Strip-metadata preserves original format encoding instead of always PNG
- Fix e2e tests: rotate/crop/border button selectors match actual UI
- Fix e2e tests: create Engineering/Design teams in people test setup
- Fix e2e tests: people UI uses select for team field, not text input
- Update visual regression baseline for tablet home page
2026-04-04 17:44:51 +08:00
Siddharth Kumar Sah 9f0354388f fix: replace navigator.clipboard with copyToClipboard utility 2026-04-04 16:33:10 +08:00
Siddharth Kumar Sah b650dcd791 fix: replace crypto.randomUUID with generateId in pipeline/automation 2026-04-04 16:31:35 +08:00
Siddharth Kumar Sah 659081c568 fix: replace crypto.randomUUID with generateId in AI tool settings 2026-04-04 16:30:44 +08:00
Siddharth Kumar Sah 7a5a753a2d fix: replace crypto.randomUUID with generateId in use-tool-processor 2026-04-04 16:29:48 +08:00
Siddharth Kumar Sah 6b03a8b8bd fix: restore navigator.clipboard and execCommand mocks in tests 2026-04-04 16:28:43 +08:00
Siddharth Kumar Sah 19ce303123 feat: add copyToClipboard() utility with execCommand fallback 2026-04-04 16:25:25 +08:00