@umituz/react-native-ai-generation-content 1.17.229 → 1.17.231
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/LICENSE +21 -0
- package/README.md +346 -0
- package/package.json +1 -3
- package/src/domain/README.md +503 -0
- package/src/domains/content-moderation/README.md +363 -0
- package/src/domains/creations/README.md +394 -0
- package/src/domains/face-detection/README.md +395 -0
- package/src/domains/prompts/README.md +387 -0
- package/src/features/ai-hug/README.md +276 -0
- package/src/features/ai-kiss/README.md +276 -0
- package/src/features/anime-selfie/README.md +325 -0
- package/src/features/audio-generation/README.md +370 -0
- package/src/features/colorization/README.md +289 -0
- package/src/features/couple-future/README.md +270 -0
- package/src/features/face-swap/README.md +431 -0
- package/src/features/future-prediction/README.md +281 -0
- package/src/features/hd-touch-up/README.md +309 -0
- package/src/features/image-captioning/README.md +361 -0
- package/src/features/image-to-image/README.md +418 -0
- package/src/features/image-to-video/README.md +369 -0
- package/src/features/inpainting/README.md +302 -0
- package/src/features/meme-generator/README.md +327 -0
- package/src/features/photo-restoration/README.md +286 -0
- package/src/features/remove-background/README.md +292 -0
- package/src/features/remove-object/README.md +352 -0
- package/src/features/replace-background/README.md +288 -0
- package/src/features/script-generator/README.md +362 -0
- package/src/features/shared/README.md +280 -0
- package/src/features/sketch-to-image/README.md +296 -0
- package/src/features/style-transfer/README.md +301 -0
- package/src/features/text-to-image/README.md +394 -0
- package/src/features/text-to-video/README.md +245 -0
- package/src/features/text-to-voice/README.md +335 -0
- package/src/features/upscaling/README.md +247 -0
- package/src/infrastructure/config/README.md +310 -0
- package/src/infrastructure/middleware/README.md +378 -0
- package/src/infrastructure/orchestration/README.md +362 -0
- package/src/infrastructure/services/README.md +382 -0
- package/src/infrastructure/utils/README.md +523 -0
- package/src/infrastructure/wrappers/README.md +336 -0
- package/src/presentation/components/README.md +535 -0
- package/src/presentation/components/result/ResultStoryCard.tsx +1 -6
- package/src/presentation/hooks/README.md +380 -0
- package/src/presentation/layouts/README.md +374 -0
- package/src/presentation/screens/README.md +430 -0
- package/src/presentation/types/result-config.types.ts +3 -3
- package/src/presentation/layouts/types/.npmignore.tmp +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# AI Kiss
|
|
2
|
+
|
|
3
|
+
Generate AI-powered kiss images between two people.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Create realistic kiss images from two photos
|
|
8
|
+
- Automatic face and pose detection
|
|
9
|
+
- Natural positioning and expression
|
|
10
|
+
- Support for various kiss styles
|
|
11
|
+
- High-quality facial matching
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
This feature is part of `@umituz/react-native-ai-generation-content`.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @umituz/react-native-ai-generation-content
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
### Using the Hook
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { useAIKissFeature } from '@umituz/react-native-ai-generation-content';
|
|
27
|
+
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
+
|
|
29
|
+
function AIKissScreen() {
|
|
30
|
+
const [person1, setPerson1] = useState<string | null>(null);
|
|
31
|
+
const [person2, setPerson2] = useState<string | null>(null);
|
|
32
|
+
|
|
33
|
+
const feature = useAIKissFeature({
|
|
34
|
+
config: {
|
|
35
|
+
kissType: 'romantic',
|
|
36
|
+
onProcessingStart: () => console.log('Generating kiss...'),
|
|
37
|
+
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
38
|
+
onError: (error) => console.error('Error:', error),
|
|
39
|
+
},
|
|
40
|
+
onSelectPerson1: 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
|
+
setPerson1(base64);
|
|
45
|
+
return base64;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
},
|
|
49
|
+
onSelectPerson2: async () => {
|
|
50
|
+
const result = await ImagePicker.launchImageLibrary({ mediaType: 'photo' });
|
|
51
|
+
if (result.assets && result.assets[0].uri) {
|
|
52
|
+
const base64 = await convertToBase64(result.assets[0].uri);
|
|
53
|
+
setPerson2(base64);
|
|
54
|
+
return base64;
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
},
|
|
58
|
+
onSaveResult: async (imageUrl) => {
|
|
59
|
+
await saveToGallery(imageUrl);
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<View>
|
|
65
|
+
<DualImagePicker
|
|
66
|
+
sourceImage={person1}
|
|
67
|
+
targetImage={person2}
|
|
68
|
+
onSelectSourceImage={feature.selectPerson1}
|
|
69
|
+
onSelectTargetImage={feature.selectPerson2}
|
|
70
|
+
sourceLabel="Person 1"
|
|
71
|
+
targetLabel="Person 2"
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<KissTypeSelector
|
|
75
|
+
selectedType={feature.state.kissType}
|
|
76
|
+
onSelectType={feature.setKissType}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<Button
|
|
80
|
+
title="Generate AI Kiss"
|
|
81
|
+
onPress={feature.process}
|
|
82
|
+
disabled={!feature.isReady || feature.state.isProcessing}
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
{feature.state.isProcessing && (
|
|
86
|
+
<View>
|
|
87
|
+
<Text>Creating your kiss image...</Text>
|
|
88
|
+
<ProgressBar progress={feature.state.progress} />
|
|
89
|
+
</View>
|
|
90
|
+
)}
|
|
91
|
+
|
|
92
|
+
{feature.state.result && (
|
|
93
|
+
<Image source={{ uri: feature.state.result.imageUrl }} />
|
|
94
|
+
)}
|
|
95
|
+
</View>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Using the Unified AI Feature Screen
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import { AIFeatureScreen } from '@umituz/react-native-ai-generation-content';
|
|
104
|
+
|
|
105
|
+
function App() {
|
|
106
|
+
return (
|
|
107
|
+
<AIFeatureScreen
|
|
108
|
+
featureId="ai-kiss"
|
|
109
|
+
userId="user-123"
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Configuration Options
|
|
116
|
+
|
|
117
|
+
### Feature Config
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
interface AIKissFeatureConfig {
|
|
121
|
+
kissType?: 'romantic' | 'gentle' | 'passionate' | 'cute';
|
|
122
|
+
onProcessingStart?: () => void;
|
|
123
|
+
onProcessingComplete?: (result: AIKissResult) => void;
|
|
124
|
+
onError?: (error: string) => void;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Generation Options
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
interface AIKissOptions {
|
|
132
|
+
kissType: 'romantic' | 'gentle' | 'passionate' | 'cute';
|
|
133
|
+
preserveFaces?: boolean; // Maintain facial features (default: true)
|
|
134
|
+
enhanceQuality?: boolean; // Enhance output quality (default: true)
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Kiss Types
|
|
139
|
+
|
|
140
|
+
### Romantic Kiss
|
|
141
|
+
|
|
142
|
+
```tsx
|
|
143
|
+
const result = await feature.process({
|
|
144
|
+
kissType: 'romantic',
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Gentle Kiss
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
const result = await feature.process({
|
|
152
|
+
kissType: 'gentle',
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Passionate Kiss
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
const result = await feature.process({
|
|
160
|
+
kissType: 'passionate',
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Cute Kiss
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
const result = await feature.process({
|
|
168
|
+
kissType: 'cute',
|
|
169
|
+
});
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Usage Flow
|
|
173
|
+
|
|
174
|
+
1. Select **Person 1** - Choose the first person's photo
|
|
175
|
+
2. Select **Person 2** - Choose the second person's photo
|
|
176
|
+
3. Choose **Kiss Type** - Select the style of kiss
|
|
177
|
+
4. Tap **Generate** - Start the AI generation
|
|
178
|
+
5. View Result - See the generated kiss image
|
|
179
|
+
6. Save or Share - Save to gallery or share
|
|
180
|
+
|
|
181
|
+
## Component Examples
|
|
182
|
+
|
|
183
|
+
### Kiss Type Selector
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
import { StylePresetsGrid } from '@umituz/react-native-ai-generation-content';
|
|
187
|
+
|
|
188
|
+
const kissTypes = [
|
|
189
|
+
{ id: 'romantic', name: 'Romantic', preview: '...' },
|
|
190
|
+
{ id: 'gentle', name: 'Gentle', preview: '...' },
|
|
191
|
+
{ id: 'passionate', name: 'Passionate', preview: '...' },
|
|
192
|
+
{ id: 'cute', name: 'Cute', preview: '...' },
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
<StylePresetsGrid
|
|
196
|
+
styles={kissTypes}
|
|
197
|
+
selectedStyle={selectedKissType}
|
|
198
|
+
onSelectStyle={setSelectedKissType}
|
|
199
|
+
/>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Result Display with Actions
|
|
203
|
+
|
|
204
|
+
```tsx
|
|
205
|
+
import { ResultImageCard } from '@umituz/react-native-ai-generation-content';
|
|
206
|
+
|
|
207
|
+
{feature.state.result && (
|
|
208
|
+
<ResultImageCard
|
|
209
|
+
imageUrl={feature.state.result.imageUrl}
|
|
210
|
+
onSave={() => feature.saveResult()}
|
|
211
|
+
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
212
|
+
onRegenerate={() => feature.process()}
|
|
213
|
+
/>
|
|
214
|
+
)}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Best Practices
|
|
218
|
+
|
|
219
|
+
1. **Photo Quality**: Use high-quality, well-lit photos
|
|
220
|
+
2. **Face Visibility**: Ensure both faces are clearly visible
|
|
221
|
+
3. **Forward Facing**: Forward-facing photos work best
|
|
222
|
+
4. **Similar Angles**: Similar head angles produce more natural results
|
|
223
|
+
5. **Good Lighting**: Even lighting creates better facial matching
|
|
224
|
+
|
|
225
|
+
## Use Cases
|
|
226
|
+
|
|
227
|
+
### Couple Photos
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
// Create romantic kiss images for couples
|
|
231
|
+
const result = await feature.process({
|
|
232
|
+
kissType: 'romantic',
|
|
233
|
+
preserveFaces: true,
|
|
234
|
+
});
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Fun & Creative
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
// Generate fun kiss images
|
|
241
|
+
const result = await feature.process({
|
|
242
|
+
kissType: 'cute',
|
|
243
|
+
enhanceQuality: true,
|
|
244
|
+
});
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Social Media Content
|
|
248
|
+
|
|
249
|
+
```tsx
|
|
250
|
+
// Create engaging social media content
|
|
251
|
+
const result = await feature.process({
|
|
252
|
+
kissType: 'gentle',
|
|
253
|
+
});
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Error Handling
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
const { state, process } = useAIKissFeature({ ...config });
|
|
260
|
+
|
|
261
|
+
useEffect(() => {
|
|
262
|
+
if (state.error) {
|
|
263
|
+
Alert.alert('Generation Failed', state.error);
|
|
264
|
+
}
|
|
265
|
+
}, [state.error]);
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Related Features
|
|
269
|
+
|
|
270
|
+
- [AI Hug](../ai-hug) - Generate AI hug images
|
|
271
|
+
- [Couple Future](../couple-future) - Generate future couple predictions
|
|
272
|
+
- [Face Swap](../face-swap) - Swap faces between images
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
MIT
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# Anime Selfie
|
|
2
|
+
|
|
3
|
+
Convert photos to anime/manga style using AI.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Transform photos into anime-style artwork
|
|
8
|
+
- Multiple anime style options
|
|
9
|
+
- Support for portraits and group photos
|
|
10
|
+
- High-quality character preservation
|
|
11
|
+
- Customizable intensity levels
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
This feature is part of `@umituz/react-native-ai-generation-content`.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @umituz/react-native-ai-generation-content
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
### Using the Hook
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { useAnimeSelfieFeature } from '@umituz/react-native-ai-generation-content';
|
|
27
|
+
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
+
|
|
29
|
+
function AnimeSelfieScreen() {
|
|
30
|
+
const [photo, setPhoto] = useState<string | null>(null);
|
|
31
|
+
|
|
32
|
+
const feature = useAnimeSelfieFeature({
|
|
33
|
+
config: {
|
|
34
|
+
style: 'shonen',
|
|
35
|
+
intensity: 0.8,
|
|
36
|
+
onProcessingStart: () => console.log('Converting to anime...'),
|
|
37
|
+
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
38
|
+
onError: (error) => console.error('Error:', error),
|
|
39
|
+
},
|
|
40
|
+
onSelectPhoto: 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
|
+
setPhoto(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={photo}
|
|
58
|
+
onSelectImage={feature.selectPhoto}
|
|
59
|
+
title="Select Photo to Convert"
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<AnimeStyleSelector
|
|
63
|
+
selectedStyle={feature.state.style}
|
|
64
|
+
onSelectStyle={feature.setStyle}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<IntensitySlider
|
|
68
|
+
value={feature.state.intensity}
|
|
69
|
+
onChange={feature.setIntensity}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
<Button
|
|
73
|
+
title="Convert to Anime"
|
|
74
|
+
onPress={feature.process}
|
|
75
|
+
disabled={!feature.isReady || feature.state.isProcessing}
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
{feature.state.isProcessing && (
|
|
79
|
+
<ActivityIndicator />
|
|
80
|
+
)}
|
|
81
|
+
|
|
82
|
+
{feature.state.result && (
|
|
83
|
+
<ResultDisplay
|
|
84
|
+
originalImage={photo}
|
|
85
|
+
resultImage={feature.state.result.imageUrl}
|
|
86
|
+
onSave={() => feature.saveResult()}
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
</View>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Using the Unified AI Feature Screen
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
import { AIFeatureScreen } from '@umituz/react-native-ai-generation-content';
|
|
98
|
+
|
|
99
|
+
function App() {
|
|
100
|
+
return (
|
|
101
|
+
<AIFeatureScreen
|
|
102
|
+
featureId="anime-selfie"
|
|
103
|
+
userId="user-123"
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Configuration Options
|
|
110
|
+
|
|
111
|
+
### Feature Config
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
interface AnimeSelfieFeatureConfig {
|
|
115
|
+
style?: 'shonen' | 'shojo' | 'chibi' | 'realistic';
|
|
116
|
+
intensity?: number; // 0.0 - 1.0 (default: 0.8)
|
|
117
|
+
onProcessingStart?: () => void;
|
|
118
|
+
onProcessingComplete?: (result: AnimeSelfieResult) => void;
|
|
119
|
+
onError?: (error: string) => void;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Generation Options
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
interface AnimeSelfieOptions {
|
|
127
|
+
style: 'shonen' | 'shojo' | 'chibi' | 'realistic';
|
|
128
|
+
intensity: number; // How strong the anime effect is (0.0 - 1.0)
|
|
129
|
+
enhanceDetails?: boolean; // Enhance anime features (default: true)
|
|
130
|
+
backgroundStyle?: 'original' | 'anime' | 'solid';
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Anime Styles
|
|
135
|
+
|
|
136
|
+
### Shonen Style
|
|
137
|
+
|
|
138
|
+
Bold, action-oriented manga style:
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
const result = await feature.process({
|
|
142
|
+
style: 'shonen',
|
|
143
|
+
intensity: 0.9,
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Shojo Style
|
|
148
|
+
|
|
149
|
+
Soft, romantic manga style:
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
const result = await feature.process({
|
|
153
|
+
style: 'shojo',
|
|
154
|
+
intensity: 0.8,
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Chibi Style
|
|
159
|
+
|
|
160
|
+
Cute, small character style:
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
const result = await feature.process({
|
|
164
|
+
style: 'chibi',
|
|
165
|
+
intensity: 1.0,
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Realistic Style
|
|
170
|
+
|
|
171
|
+
Semi-realistic anime style:
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
const result = await feature.process({
|
|
175
|
+
style: 'realistic',
|
|
176
|
+
intensity: 0.7,
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Usage Flow
|
|
181
|
+
|
|
182
|
+
1. Select **Photo** - Choose a photo to convert
|
|
183
|
+
2. Choose **Anime Style** - Select the desired anime style
|
|
184
|
+
3. Adjust **Intensity** - Control how strong the effect is
|
|
185
|
+
4. Tap **Convert** - Start the conversion
|
|
186
|
+
5. View **Result** - See the anime version
|
|
187
|
+
6. Save or Share - Save or share the result
|
|
188
|
+
|
|
189
|
+
## Component Examples
|
|
190
|
+
|
|
191
|
+
### Style Selector
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
import { StylePresetsGrid } from '@umituz/react-native-ai-generation-content';
|
|
195
|
+
|
|
196
|
+
const animeStyles = [
|
|
197
|
+
{ id: 'shonen', name: 'Shonen', preview: '...' },
|
|
198
|
+
{ id: 'shojo', name: 'Shojo', preview: '...' },
|
|
199
|
+
{ id: 'chibi', name: 'Chibi', preview: '...' },
|
|
200
|
+
{ id: 'realistic', name: 'Realistic', preview: '...' },
|
|
201
|
+
];
|
|
202
|
+
|
|
203
|
+
<StylePresetsGrid
|
|
204
|
+
styles={animeStyles}
|
|
205
|
+
selectedStyle={selectedStyle}
|
|
206
|
+
onSelectStyle={setSelectedStyle}
|
|
207
|
+
/>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Intensity Slider
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
import { Slider } from 'react-native';
|
|
214
|
+
|
|
215
|
+
<Slider
|
|
216
|
+
minimumValue={0}
|
|
217
|
+
maximumValue={1}
|
|
218
|
+
step={0.1}
|
|
219
|
+
value={intensity}
|
|
220
|
+
onValueChange={setIntensity}
|
|
221
|
+
/>
|
|
222
|
+
|
|
223
|
+
<Text>Intensity: {Math.round(intensity * 100)}%</Text>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Before/After Comparison
|
|
227
|
+
|
|
228
|
+
```tsx
|
|
229
|
+
import { ResultDisplay } from '@umituz/react-native-ai-generation-content';
|
|
230
|
+
|
|
231
|
+
{feature.state.result && photo && (
|
|
232
|
+
<ResultDisplay
|
|
233
|
+
originalImage={photo}
|
|
234
|
+
resultImage={feature.state.result.imageUrl}
|
|
235
|
+
onSave={() => feature.saveResult()}
|
|
236
|
+
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
237
|
+
/>
|
|
238
|
+
)}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Advanced Usage
|
|
242
|
+
|
|
243
|
+
### Custom Options
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
const result = await feature.process({
|
|
247
|
+
style: 'shonen',
|
|
248
|
+
intensity: 0.85,
|
|
249
|
+
enhanceDetails: true,
|
|
250
|
+
backgroundStyle: 'anime',
|
|
251
|
+
});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Batch Processing
|
|
255
|
+
|
|
256
|
+
```tsx
|
|
257
|
+
// Convert multiple photos
|
|
258
|
+
const photos = ['photo1.jpg', 'photo2.jpg', 'photo3.jpg'];
|
|
259
|
+
const results = await Promise.all(
|
|
260
|
+
photos.map(photo => feature.process({ image: photo }))
|
|
261
|
+
);
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Best Practices
|
|
265
|
+
|
|
266
|
+
1. **Portrait Photos**: Forward-facing portraits work best
|
|
267
|
+
2. **Good Lighting**: Even lighting produces better results
|
|
268
|
+
3. **Clear Faces**: Ensure facial features are clearly visible
|
|
269
|
+
4. **Intensity**: Start with 0.7-0.8 for natural results
|
|
270
|
+
5. **Style Selection**: Match style to photo subject and mood
|
|
271
|
+
|
|
272
|
+
## Use Cases
|
|
273
|
+
|
|
274
|
+
### Profile Pictures
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
// Create anime profile pictures
|
|
278
|
+
const result = await feature.process({
|
|
279
|
+
style: 'shojo',
|
|
280
|
+
intensity: 0.8,
|
|
281
|
+
});
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Social Media
|
|
285
|
+
|
|
286
|
+
```tsx
|
|
287
|
+
// Generate anime content for social media
|
|
288
|
+
const result = await feature.process({
|
|
289
|
+
style: 'chibi',
|
|
290
|
+
intensity: 1.0,
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Art Projects
|
|
295
|
+
|
|
296
|
+
```tsx
|
|
297
|
+
// Create anime art from photos
|
|
298
|
+
const result = await feature.process({
|
|
299
|
+
style: 'realistic',
|
|
300
|
+
intensity: 0.7,
|
|
301
|
+
enhanceDetails: true,
|
|
302
|
+
});
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Error Handling
|
|
306
|
+
|
|
307
|
+
```tsx
|
|
308
|
+
const { state, process } = useAnimeSelfieFeature({ ...config });
|
|
309
|
+
|
|
310
|
+
useEffect(() => {
|
|
311
|
+
if (state.error) {
|
|
312
|
+
Alert.alert('Conversion Failed', state.error);
|
|
313
|
+
}
|
|
314
|
+
}, [state.error]);
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Related Features
|
|
318
|
+
|
|
319
|
+
- [Style Transfer](../style-transfer) - Apply artistic styles to images
|
|
320
|
+
- [Face Swap](../face-swap) - Swap faces between images
|
|
321
|
+
- [Text to Image](../text-to-image) - Generate anime from text prompts
|
|
322
|
+
|
|
323
|
+
## License
|
|
324
|
+
|
|
325
|
+
MIT
|