@umituz/react-native-ai-generation-content 1.17.232 → 1.17.233
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +236 -261
- package/package.json +1 -1
- package/src/domains/content-moderation/README.md +239 -296
- package/src/domains/creations/README.md +242 -325
- package/src/domains/face-detection/README.md +228 -307
- package/src/domains/prompts/README.md +242 -312
- package/src/features/ai-hug/README.md +381 -219
- package/src/features/ai-kiss/README.md +388 -219
- package/src/features/anime-selfie/README.md +327 -256
- package/src/features/audio-generation/README.md +352 -309
- package/src/features/colorization/README.md +332 -228
- package/src/features/couple-future/README.md +387 -212
- package/src/features/future-prediction/README.md +391 -221
- package/src/features/hd-touch-up/README.md +339 -252
- package/src/features/image-captioning/README.md +359 -299
- package/src/features/image-to-image/README.md +398 -357
- package/src/features/image-to-video/README.md +337 -292
- package/src/features/inpainting/README.md +348 -244
- package/src/features/meme-generator/README.md +350 -269
- package/src/features/remove-background/README.md +335 -234
- package/src/features/remove-object/README.md +341 -288
- package/src/features/replace-background/README.md +353 -236
- package/src/features/script-generator/README.md +358 -287
- package/src/features/shared/README.md +254 -223
- package/src/features/sketch-to-image/README.md +331 -234
- package/src/features/style-transfer/README.md +336 -237
- package/src/features/text-to-video/README.md +360 -193
- package/src/features/text-to-voice/README.md +382 -272
|
@@ -1,309 +1,396 @@
|
|
|
1
|
-
# HD Touch Up
|
|
1
|
+
# HD Touch Up Feature
|
|
2
2
|
|
|
3
3
|
Apply high-detail enhancements to images using AI.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 📍 Import Path
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Improve facial features in portraits
|
|
11
|
-
- Add professional polish
|
|
7
|
+
```typescript
|
|
8
|
+
import { useHDTouchUpFeature } from '@umituz/react-native-ai-generation-content';
|
|
9
|
+
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
**Location**: `src/features/hd-touch-up/`
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## 🎯 Feature Purpose
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
npm install @umituz/react-native-ai-generation-content
|
|
19
|
-
```
|
|
15
|
+
Enhance image quality with AI-powered improvements including sharpening, noise reduction, facial enhancement, color adjustment, and contrast optimization. Professional-quality touch-ups for portraits, product photos, landscapes, and more.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
---
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
## 📋 Usage Strategy
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
import { useHDTouchUpFeature } from '@umituz/react-native-ai-generation-content';
|
|
27
|
-
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
-
|
|
29
|
-
function HDTouchUpScreen() {
|
|
30
|
-
const [image, setImage] = useState<string | null>(null);
|
|
31
|
-
|
|
32
|
-
const feature = useHDTouchUpFeature({
|
|
33
|
-
config: {
|
|
34
|
-
enhancementLevel: 'medium',
|
|
35
|
-
enhanceFaces: true,
|
|
36
|
-
onProcessingStart: () => console.log('Enhancing image...'),
|
|
37
|
-
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
38
|
-
onError: (error) => console.error('Error:', error),
|
|
39
|
-
},
|
|
40
|
-
onSelectImage: async () => {
|
|
41
|
-
const result = await ImagePicker.launchImageLibrary({ mediaType: 'photo' });
|
|
42
|
-
if (result.assets && result.assets[0].uri) {
|
|
43
|
-
const base64 = await convertToBase64(result.assets[0].uri);
|
|
44
|
-
setImage(base64);
|
|
45
|
-
return base64;
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
},
|
|
49
|
-
onSaveResult: async (imageUrl) => {
|
|
50
|
-
await saveToGallery(imageUrl);
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<View>
|
|
56
|
-
<PhotoUploadCard
|
|
57
|
-
image={image}
|
|
58
|
-
onSelectImage={feature.selectImage}
|
|
59
|
-
title="Select Image to Enhance"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<EnhancementLevelSelector
|
|
63
|
-
selectedLevel={feature.state.enhancementLevel}
|
|
64
|
-
onSelectLevel={feature.setEnhancementLevel}
|
|
65
|
-
/>
|
|
66
|
-
|
|
67
|
-
<Button
|
|
68
|
-
title="Enhance Image"
|
|
69
|
-
onPress={feature.process}
|
|
70
|
-
disabled={!feature.isReady || feature.state.isProcessing}
|
|
71
|
-
/>
|
|
72
|
-
|
|
73
|
-
{feature.state.isProcessing && (
|
|
74
|
-
<View>
|
|
75
|
-
<Text>Enhancing image...</Text>
|
|
76
|
-
<ProgressBar progress={feature.state.progress} />
|
|
77
|
-
</View>
|
|
78
|
-
)}
|
|
79
|
-
|
|
80
|
-
{feature.state.result && (
|
|
81
|
-
<ResultDisplay
|
|
82
|
-
originalImage={image}
|
|
83
|
-
resultImage={feature.state.result.imageUrl}
|
|
84
|
-
onSave={() => feature.saveResult()}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
</View>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
```
|
|
21
|
+
### When to Use This Feature
|
|
91
22
|
|
|
92
|
-
|
|
23
|
+
✅ **Use Cases:**
|
|
24
|
+
- Enhancing portrait photographs
|
|
25
|
+
- Improving product photo quality
|
|
26
|
+
- Sharpening landscape details
|
|
27
|
+
- Reducing noise in low-light photos
|
|
28
|
+
- Professional photo polishing
|
|
93
29
|
|
|
94
|
-
|
|
95
|
-
|
|
30
|
+
❌ **When NOT to Use:**
|
|
31
|
+
- Restoring damaged photos (use Photo Restoration)
|
|
32
|
+
- Adding color to B&W photos (use Colorization)
|
|
33
|
+
- Upscaling resolution (use Upscaling)
|
|
34
|
+
- Applying artistic filters (use Style Transfer)
|
|
96
35
|
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<AIFeatureScreen
|
|
100
|
-
featureId="hd-touch-up"
|
|
101
|
-
userId="user-123"
|
|
102
|
-
/>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
```
|
|
36
|
+
### Implementation Strategy
|
|
106
37
|
|
|
107
|
-
|
|
38
|
+
1. **Select image** to enhance
|
|
39
|
+
2. **Choose enhancement level** (low, medium, high)
|
|
40
|
+
3. **Configure options** (enhance faces, denoise, sharpen, etc.)
|
|
41
|
+
4. **Process enhancement** with progress tracking
|
|
42
|
+
5. **Preview and compare** with original
|
|
43
|
+
6. **Save or share** enhanced image
|
|
108
44
|
|
|
109
|
-
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ⚠️ Critical Rules (MUST FOLLOW)
|
|
48
|
+
|
|
49
|
+
### 1. Image Requirements
|
|
50
|
+
- **MUST** provide ONE image to enhance
|
|
51
|
+
- **MUST** use reasonably high-quality images (min 512x512)
|
|
52
|
+
- **MUST** have clear, visible content
|
|
53
|
+
- **MUST NOT** exceed file size limits (10MB max)
|
|
54
|
+
- **MUST NOT** use extremely blurry or unusable photos
|
|
55
|
+
|
|
56
|
+
### 2. Configuration
|
|
57
|
+
- **MUST** provide valid `userId` for tracking
|
|
58
|
+
- **MUST** specify `enhancementLevel` (low, medium, high)
|
|
59
|
+
- **MUST** configure enhancement options
|
|
60
|
+
- **MUST** implement `onError` callback
|
|
61
|
+
- **MUST** implement `onSelectImage` callback
|
|
62
|
+
|
|
63
|
+
### 3. State Management
|
|
64
|
+
- **MUST** check `isReady` before enabling enhance button
|
|
65
|
+
- **MUST** display progress during enhancement
|
|
66
|
+
- **MUST** handle long processing times
|
|
67
|
+
- **MUST** display `error` state with clear messages
|
|
68
|
+
- **MUST** implement proper cleanup on unmount
|
|
69
|
+
|
|
70
|
+
### 4. Performance
|
|
71
|
+
- **MUST** implement image compression before upload
|
|
72
|
+
- **MUST** show progress indicator for processing
|
|
73
|
+
- **MUST** cache results locally
|
|
74
|
+
- **MUST** allow users to cancel processing
|
|
75
|
+
- **MUST NOT** enhance multiple images simultaneously
|
|
76
|
+
|
|
77
|
+
### 5. Enhancement Options
|
|
78
|
+
- **MUST** provide enhancement level control
|
|
79
|
+
- **MUST** support facial enhancement toggle
|
|
80
|
+
- **MUST** support denoise option
|
|
81
|
+
- **MUST** support sharpen option
|
|
82
|
+
- **MUST** support color and contrast adjustments
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 🚫 Prohibitions (MUST AVOID)
|
|
87
|
+
|
|
88
|
+
### Strictly Forbidden
|
|
89
|
+
|
|
90
|
+
❌ **NEVER** do the following:
|
|
91
|
+
|
|
92
|
+
1. **No Missing Images**
|
|
93
|
+
- Always validate image is selected
|
|
94
|
+
- Never call process() without image
|
|
95
|
+
|
|
96
|
+
2. **No Auto-Processing**
|
|
97
|
+
- Never start enhancement without user action
|
|
98
|
+
- Always require explicit "Enhance" button press
|
|
99
|
+
- Show preview before processing
|
|
100
|
+
|
|
101
|
+
3. **No Hardcoded Credentials**
|
|
102
|
+
- Never store API keys in component files
|
|
103
|
+
- Use environment variables or secure storage
|
|
104
|
+
|
|
105
|
+
4. **No Unhandled Errors**
|
|
106
|
+
- Never ignore enhancement failures
|
|
107
|
+
- Always explain what went wrong
|
|
108
|
+
- Provide retry or alternative options
|
|
109
|
+
|
|
110
|
+
5. **No Memory Leaks**
|
|
111
|
+
- Never store both original and enhanced simultaneously
|
|
112
|
+
- Clean up temporary images
|
|
113
|
+
- Implement proper image disposal
|
|
114
|
+
|
|
115
|
+
6. **No Blocked UI**
|
|
116
|
+
- Never block main thread with image processing
|
|
117
|
+
- Always show progress indicator
|
|
118
|
+
- Allow cancellation
|
|
119
|
+
|
|
120
|
+
7. **No Over-Enhancement**
|
|
121
|
+
- Never apply maximum enhancement by default
|
|
122
|
+
- Always start with moderate levels
|
|
123
|
+
- Allow user to adjust intensity
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🤖 AI Agent Directions
|
|
128
|
+
|
|
129
|
+
### For AI Code Generation Tools
|
|
130
|
+
|
|
131
|
+
When using this feature with AI code generation tools, follow these guidelines:
|
|
132
|
+
|
|
133
|
+
#### Prompt Template for AI Agents
|
|
110
134
|
|
|
111
|
-
```tsx
|
|
112
|
-
interface HDTouchUpFeatureConfig {
|
|
113
|
-
enhancementLevel?: 'low' | 'medium' | 'high';
|
|
114
|
-
enhanceFaces?: boolean; // Apply face-specific enhancements
|
|
115
|
-
denoise?: boolean; // Reduce image noise
|
|
116
|
-
sharpen?: boolean; // Sharpen details
|
|
117
|
-
onProcessingStart?: () => void;
|
|
118
|
-
onProcessingComplete?: (result: HDTouchUpResult) => void;
|
|
119
|
-
onError?: (error: string) => void;
|
|
120
|
-
}
|
|
121
135
|
```
|
|
136
|
+
You are implementing an HD touch up feature using @umituz/react-native-ai-generation-content.
|
|
137
|
+
|
|
138
|
+
REQUIREMENTS:
|
|
139
|
+
1. Import from: @umituz/react-native-ai-generation-content
|
|
140
|
+
2. Use the useHDTouchUpFeature hook
|
|
141
|
+
3. Select enhancement level (low, medium, high)
|
|
142
|
+
4. Implement image selection UI
|
|
143
|
+
5. Configure enhancement options (faces, denoise, sharpen, colors, contrast)
|
|
144
|
+
6. Validate image before enhancement
|
|
145
|
+
7. Show before/after comparison
|
|
146
|
+
8. Handle long processing times with progress
|
|
147
|
+
9. Implement proper error handling
|
|
148
|
+
10. Implement cleanup on unmount
|
|
149
|
+
|
|
150
|
+
CRITICAL RULES:
|
|
151
|
+
- MUST validate image before calling enhance()
|
|
152
|
+
- MUST show before/after comparison
|
|
153
|
+
- MUST handle enhancement level selection
|
|
154
|
+
- MUST handle individual enhancement toggles
|
|
155
|
+
- MUST implement debouncing (300ms)
|
|
156
|
+
- MUST allow regeneration with different settings
|
|
157
|
+
|
|
158
|
+
CONFIGURATION:
|
|
159
|
+
- Provide valid userId (string)
|
|
160
|
+
- Set enhancementLevel: 'low' | 'medium' | 'high'
|
|
161
|
+
- Set enhanceFaces: boolean (portrait enhancement)
|
|
162
|
+
- Set denoise: boolean (reduce noise)
|
|
163
|
+
- Set sharpen: boolean (sharpen details)
|
|
164
|
+
- Set adjustColors: boolean (improve vibrancy)
|
|
165
|
+
- Set adjustContrast: boolean (enhance tones)
|
|
166
|
+
- Implement onSelectImage callback
|
|
167
|
+
- Implement onSaveResult callback
|
|
168
|
+
- Configure callbacks: onProcessingStart, onProcessingComplete, onError
|
|
169
|
+
|
|
170
|
+
ENHANCEMENT LEVELS:
|
|
171
|
+
- low: Subtle improvements, natural look
|
|
172
|
+
- medium: Balanced enhancements (recommended)
|
|
173
|
+
- high: Strong enhancements, professional quality
|
|
174
|
+
|
|
175
|
+
OPTIONS:
|
|
176
|
+
- enhanceFaces: Apply face-specific enhancements
|
|
177
|
+
- denoise: Remove noise and grain
|
|
178
|
+
- sharpen: Enhance edges and details
|
|
179
|
+
- adjustColors: Improve color vibrancy
|
|
180
|
+
- adjustContrast: Enhance contrast and tones
|
|
181
|
+
|
|
182
|
+
STRICTLY FORBIDDEN:
|
|
183
|
+
- No missing image validation
|
|
184
|
+
- No auto-processing without user action
|
|
185
|
+
- No hardcoded API keys
|
|
186
|
+
- No unhandled errors
|
|
187
|
+
- No memory leaks
|
|
188
|
+
- No blocking UI
|
|
189
|
+
- No over-enhancement
|
|
190
|
+
|
|
191
|
+
QUALITY CHECKLIST:
|
|
192
|
+
- [ ] Image selection implemented
|
|
193
|
+
- [ ] Enhancement level selector added
|
|
194
|
+
- [ ] Enhancement toggles included
|
|
195
|
+
- [ ] Validation before enhance()
|
|
196
|
+
- [ ] Before/after comparison view
|
|
197
|
+
- [ ] Progress indicator during processing
|
|
198
|
+
- [ ] Error display with retry option
|
|
199
|
+
- [ ] Download/share functionality
|
|
200
|
+
- [ ] Regeneration with different settings
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### AI Implementation Checklist
|
|
204
|
+
|
|
205
|
+
Use this checklist when generating code:
|
|
206
|
+
|
|
207
|
+
- [ ] Feature imported from correct path
|
|
208
|
+
- [ ] Image selection implemented
|
|
209
|
+
- [ ] Enhancement level selector added
|
|
210
|
+
- [ ] Enhancement toggles implemented
|
|
211
|
+
- [ ] Validation before enhance()
|
|
212
|
+
- [ ] Before/after comparison view
|
|
213
|
+
- [ ] Progress indicator during processing
|
|
214
|
+
- [ ] Error display with user-friendly message
|
|
215
|
+
- [ ] Download/share buttons
|
|
216
|
+
- [ ] Regeneration option
|
|
217
|
+
- [ ] Cleanup on unmount
|
|
218
|
+
- [ ] Original image preserved
|
|
122
219
|
|
|
123
|
-
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## 🛠️ Configuration Strategy
|
|
223
|
+
|
|
224
|
+
### Essential Configuration
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
// Required fields
|
|
228
|
+
{
|
|
229
|
+
userId: string
|
|
230
|
+
enhancementLevel: 'low' | 'medium' | 'high'
|
|
231
|
+
onSelectImage: () => Promise<string | null>
|
|
232
|
+
}
|
|
124
233
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
sharpen?: boolean; // Enhance edges and details
|
|
131
|
-
adjustColors?: boolean; // Improve color vibrancy
|
|
132
|
-
adjustContrast?: boolean; // Enhance contrast and tones
|
|
234
|
+
// Optional callbacks
|
|
235
|
+
{
|
|
236
|
+
onProcessingStart?: () => void
|
|
237
|
+
onProcessingComplete?: (result) => void
|
|
238
|
+
onError?: (error: string) => void
|
|
133
239
|
}
|
|
134
240
|
```
|
|
135
241
|
|
|
136
|
-
|
|
242
|
+
### Recommended Settings
|
|
137
243
|
|
|
138
|
-
|
|
244
|
+
1. **Enhancement Levels**
|
|
245
|
+
- Low: Subtle improvements for natural look
|
|
246
|
+
- Medium: Balanced enhancements (recommended for most photos)
|
|
247
|
+
- High: Maximum enhancements for professional quality
|
|
139
248
|
|
|
140
|
-
|
|
249
|
+
2. **Enhancement Options**
|
|
250
|
+
- enhanceFaces: Apply face-specific enhancements (portraits)
|
|
251
|
+
- denoise: Remove noise and grain (low-light, high-ISO photos)
|
|
252
|
+
- sharpen: Enhance edges and details
|
|
253
|
+
- adjustColors: Improve color vibrancy (faded/dull photos)
|
|
254
|
+
- adjustContrast: Enhance contrast and tones
|
|
141
255
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
```
|
|
256
|
+
3. **Image Quality**
|
|
257
|
+
- Minimum: 512x512 resolution
|
|
258
|
+
- Recommended: 1024x1024 or higher
|
|
259
|
+
- Format: JPEG or PNG
|
|
260
|
+
- Max size: 10MB
|
|
148
261
|
|
|
149
|
-
|
|
262
|
+
---
|
|
150
263
|
|
|
151
|
-
|
|
264
|
+
## 📊 State Management
|
|
152
265
|
|
|
153
|
-
|
|
154
|
-
const result = await feature.process({
|
|
155
|
-
enhancementLevel: 'medium',
|
|
156
|
-
enhanceFaces: true,
|
|
157
|
-
denoise: true,
|
|
158
|
-
sharpen: true,
|
|
159
|
-
});
|
|
160
|
-
```
|
|
266
|
+
### Feature States
|
|
161
267
|
|
|
162
|
-
|
|
268
|
+
**isReady**: boolean
|
|
269
|
+
- Image selected and validated
|
|
270
|
+
- Check before enabling enhance button
|
|
163
271
|
|
|
164
|
-
|
|
272
|
+
**isProcessing**: boolean
|
|
273
|
+
- Enhancement in progress
|
|
274
|
+
- Show loading/progress indicator
|
|
275
|
+
- Disable enhance button
|
|
165
276
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
enhanceFaces: true,
|
|
170
|
-
denoise: true,
|
|
171
|
-
sharpen: true,
|
|
172
|
-
adjustColors: true,
|
|
173
|
-
adjustContrast: true,
|
|
174
|
-
});
|
|
175
|
-
```
|
|
277
|
+
**progress**: number (0-100)
|
|
278
|
+
- Enhancement progress percentage
|
|
279
|
+
- Update progress bar
|
|
176
280
|
|
|
177
|
-
|
|
281
|
+
**error**: string | null
|
|
282
|
+
- Error message if enhancement failed
|
|
283
|
+
- Display to user with clear message
|
|
178
284
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
285
|
+
**result**: {
|
|
286
|
+
imageUrl: string
|
|
287
|
+
originalImageUrl?: string
|
|
288
|
+
enhancementLevel?: string
|
|
289
|
+
metadata?: any
|
|
290
|
+
}
|
|
185
291
|
|
|
186
|
-
|
|
292
|
+
---
|
|
187
293
|
|
|
188
|
-
|
|
294
|
+
## 🎨 Best Practices
|
|
189
295
|
|
|
190
|
-
|
|
191
|
-
import { GridSelector } from '@umituz/react-native-ai-generation-content';
|
|
296
|
+
### Enhancement Selection
|
|
192
297
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
];
|
|
298
|
+
1. **Enhancement Level**
|
|
299
|
+
- Start with Medium for most photos
|
|
300
|
+
- Use Low for subtle improvements
|
|
301
|
+
- Use High for professional quality
|
|
198
302
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
```
|
|
303
|
+
2. **Subject-Specific Options**
|
|
304
|
+
- Portraits: Enable enhanceFaces
|
|
305
|
+
- Landscapes: Enable sharpen and adjustContrast
|
|
306
|
+
- Product photos: Enable sharpen and adjustColors
|
|
307
|
+
- Low-light: Enable denoise
|
|
205
308
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
import { Switch } from 'react-native';
|
|
210
|
-
|
|
211
|
-
<View>
|
|
212
|
-
<Switch
|
|
213
|
-
value={enhanceFaces}
|
|
214
|
-
onValueChange={setEnhanceFaces}
|
|
215
|
-
/>
|
|
216
|
-
<Text>Enhance Faces</Text>
|
|
217
|
-
|
|
218
|
-
<Switch
|
|
219
|
-
value={denoise}
|
|
220
|
-
onValueChange={setDenoise}
|
|
221
|
-
/>
|
|
222
|
-
<Text>Reduce Noise</Text>
|
|
223
|
-
|
|
224
|
-
<Switch
|
|
225
|
-
value={sharpen}
|
|
226
|
-
onValueChange={setSharpen}
|
|
227
|
-
/>
|
|
228
|
-
<Text>Sharpen Details</Text>
|
|
229
|
-
</View>
|
|
230
|
-
```
|
|
309
|
+
3. **Quality**
|
|
310
|
+
- Good: Clear, well-composed photos
|
|
311
|
+
- Bad: Extremely blurry or unusable photos
|
|
231
312
|
|
|
232
|
-
###
|
|
313
|
+
### User Experience
|
|
233
314
|
|
|
234
|
-
|
|
235
|
-
|
|
315
|
+
1. **Preview**
|
|
316
|
+
- Show preview of enhancement settings
|
|
317
|
+
- Compare different enhancement levels
|
|
318
|
+
- Allow option toggles
|
|
236
319
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
onSave={() => feature.saveResult()}
|
|
242
|
-
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
243
|
-
/>
|
|
244
|
-
)}
|
|
245
|
-
```
|
|
320
|
+
2. **Before/After Comparison**
|
|
321
|
+
- Side-by-side comparison
|
|
322
|
+
- Slider for easy comparison
|
|
323
|
+
- Zoom for detail inspection
|
|
246
324
|
|
|
247
|
-
|
|
325
|
+
---
|
|
248
326
|
|
|
249
|
-
|
|
327
|
+
## 🐛 Common Pitfalls
|
|
250
328
|
|
|
251
|
-
|
|
252
|
-
// Enhance portrait photos
|
|
253
|
-
const result = await feature.process({
|
|
254
|
-
enhancementLevel: 'high',
|
|
255
|
-
enhanceFaces: true,
|
|
256
|
-
adjustColors: true,
|
|
257
|
-
});
|
|
258
|
-
```
|
|
329
|
+
### Quality Issues
|
|
259
330
|
|
|
260
|
-
|
|
331
|
+
❌ **Problem**: Over-enhanced appearance
|
|
332
|
+
✅ **Solution**: Reduce enhancement level, disable unnecessary options
|
|
261
333
|
|
|
262
|
-
|
|
263
|
-
// Improve product image quality
|
|
264
|
-
const result = await feature.process({
|
|
265
|
-
enhancementLevel: 'medium',
|
|
266
|
-
sharpen: true,
|
|
267
|
-
adjustColors: true,
|
|
268
|
-
});
|
|
269
|
-
```
|
|
334
|
+
### Subject Issues
|
|
270
335
|
|
|
271
|
-
|
|
336
|
+
❌ **Problem**: Wrong options for subject type
|
|
337
|
+
✅ **Solution**: Match options to photo subject (portraits, landscapes, etc.)
|
|
272
338
|
|
|
273
|
-
|
|
274
|
-
// Enhance landscape details
|
|
275
|
-
const result = await feature.process({
|
|
276
|
-
enhancementLevel: 'medium',
|
|
277
|
-
sharpen: true,
|
|
278
|
-
adjustContrast: true,
|
|
279
|
-
});
|
|
280
|
-
```
|
|
339
|
+
### Performance Issues
|
|
281
340
|
|
|
282
|
-
|
|
341
|
+
❌ **Problem**: Slow enhancement
|
|
342
|
+
✅ **Solution**: Compress images, show progress, allow cancellation
|
|
283
343
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 📦 Related Components
|
|
347
|
+
|
|
348
|
+
Use these components from the library:
|
|
349
|
+
|
|
350
|
+
- **PhotoUploadCard**: Upload image interface
|
|
351
|
+
- **EnhancementLevelSelector**: Choose enhancement intensity
|
|
352
|
+
- **EnhancementToggles**: Toggle specific enhancements
|
|
353
|
+
- **ResultDisplay**: Before/after comparison
|
|
354
|
+
- **ProgressBar**: Progress display
|
|
355
|
+
|
|
356
|
+
Located at: `src/presentation/components/`
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 🔄 Migration Strategy
|
|
361
|
+
|
|
362
|
+
If migrating from previous implementation:
|
|
363
|
+
|
|
364
|
+
1. **Update imports** to new path
|
|
365
|
+
2. **Add enhancement level selector**
|
|
366
|
+
3. **Implement enhancement toggles**
|
|
367
|
+
4. **Update state handling** for new structure
|
|
368
|
+
5. **Add before/after comparison**
|
|
369
|
+
6. **Test all enhancement levels**
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## 📚 Additional Resources
|
|
374
|
+
|
|
375
|
+
- Main documentation: `/docs/`
|
|
376
|
+
- API reference: `/docs/api/`
|
|
377
|
+
- Examples: `/docs/examples/basic/hd-touch-up/`
|
|
378
|
+
- Architecture: `/ARCHITECTURE.md`
|
|
292
379
|
|
|
293
|
-
|
|
380
|
+
---
|
|
294
381
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
3. **Noise Reduction**: Useful for low-light or high-ISO photos
|
|
298
|
-
4. **Sharpening**: Be careful not to over-sharpen
|
|
299
|
-
5. **Color Adjustment**: Works well for faded or dull photos
|
|
382
|
+
**Last Updated**: 2025-01-08
|
|
383
|
+
**Version**: 2.0.0 (Strategy-based Documentation)
|
|
300
384
|
|
|
301
|
-
|
|
385
|
+
---
|
|
302
386
|
|
|
303
|
-
|
|
304
|
-
- [Upscaling](../upscaling) - Increase image resolution
|
|
305
|
-
- [Colorization](../colorization) - Add color to B&W photos
|
|
387
|
+
## 📝 Changelog
|
|
306
388
|
|
|
307
|
-
|
|
389
|
+
### v2.0.0 - 2025-01-08
|
|
390
|
+
- **BREAKING**: Documentation format changed to strategy-based
|
|
391
|
+
- Removed extensive code examples
|
|
392
|
+
- Added rules, prohibitions, and AI agent directions
|
|
393
|
+
- Focus on best practices and implementation guidance
|
|
308
394
|
|
|
309
|
-
|
|
395
|
+
### v1.0.0 - Initial Release
|
|
396
|
+
- Initial feature documentation
|