feat: SOTA image enhancement with one-click auto-improve (#55)

* feat(image-enhancement): add analysis and correction types

* feat(image-enhancement): implement auto-enhance analysis and correction engine

* test(image-enhancement): add unit tests for auto-enhance engine

* feat(image-enhancement): add API route with analyze endpoint and register in constants/i18n

* feat(image-enhancement): add UI component with mode selector, intensity slider, and analysis badges

* test(image-enhancement): add integration and e2e tests

* fix(image-enhancement): use modulate instead of gamma for exposure correction

Sharp's gamma() only accepts values between 1.0 and 3.0, but brightening
underexposed images computed gamma < 1.0. Switch to modulate({ brightness })
which handles both brightening and darkening correctly.

---------

Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
This commit is contained in:
stirling-image
2026-04-13 17:48:53 +08:00
committed by GitHub
co-authored by stirling-image
parent 34ec840b72
commit a8c7b92ca5
13 changed files with 1221 additions and 0 deletions
+8
View File
@@ -161,6 +161,14 @@ export const TOOLS: Tool[] = [
icon: "Focus",
route: "/smart-crop",
},
{
id: "image-enhancement",
name: "Image Enhancement",
description: "One-click auto-improve with smart analysis",
category: "ai",
icon: "Sparkles",
route: "/image-enhancement",
},
// Watermark & Overlay
{
id: "watermark-text",
+5
View File
@@ -71,6 +71,11 @@ export const en = {
name: "Smart Crop",
description: "Smart subject, face, or trim-based cropping",
},
"image-enhancement": {
name: "Image Enhancement",
description:
"One-click auto-improve with smart exposure, contrast, color, and sharpness correction",
},
"content-aware-resize": {
name: "Content-Aware Resize",
description: "Intelligently resize images while preserving important content",