marcosyago commited on
Commit
9d34051
·
verified ·
1 Parent(s): c50597c

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1166 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Vectorware
3
- emoji: 📚
4
- colorFrom: gray
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: vectorware
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1166 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Vectorware | Professional Image Vectorization</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .dropzone {
11
+ border: 2px dashed #94a3b8;
12
+ transition: all 0.3s ease;
13
+ }
14
+ .dropzone.active {
15
+ border-color: #3b82f6;
16
+ background-color: #eff6ff;
17
+ }
18
+ .comparison-slider {
19
+ position: relative;
20
+ width: 100%;
21
+ height: 100%;
22
+ }
23
+ .comparison-slider input {
24
+ position: absolute;
25
+ width: 100%;
26
+ height: 100%;
27
+ top: 0;
28
+ left: 0;
29
+ margin: 0;
30
+ opacity: 0;
31
+ cursor: ew-resize;
32
+ z-index: 10;
33
+ }
34
+ .comparison-slider .slider-line {
35
+ position: absolute;
36
+ width: 2px;
37
+ height: 100%;
38
+ background: #3b82f6;
39
+ left: 50%;
40
+ transform: translateX(-50%);
41
+ pointer-events: none;
42
+ z-index: 5;
43
+ }
44
+ .comparison-slider .slider-handle {
45
+ position: absolute;
46
+ width: 30px;
47
+ height: 30px;
48
+ border-radius: 50%;
49
+ background: #3b82f6;
50
+ left: 50%;
51
+ top: 50%;
52
+ transform: translate(-50%, -50%);
53
+ pointer-events: none;
54
+ z-index: 6;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ color: white;
59
+ }
60
+ .color-chip {
61
+ width: 24px;
62
+ height: 24px;
63
+ border-radius: 4px;
64
+ cursor: pointer;
65
+ border: 1px solid rgba(0,0,0,0.1);
66
+ }
67
+ .color-chip.selected {
68
+ box-shadow: 0 0 0 2px white, 0 0 0 4px #3b82f6;
69
+ }
70
+ .canvas-container {
71
+ position: relative;
72
+ overflow: hidden;
73
+ background-image:
74
+ linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
75
+ linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
76
+ linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
77
+ linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
78
+ background-size: 20px 20px;
79
+ background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
80
+ }
81
+ .zoom-controls {
82
+ position: absolute;
83
+ bottom: 20px;
84
+ right: 20px;
85
+ z-index: 20;
86
+ background: white;
87
+ border-radius: 8px;
88
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
89
+ }
90
+ .progress-bar {
91
+ height: 4px;
92
+ background-color: #e5e7eb;
93
+ position: relative;
94
+ overflow: hidden;
95
+ }
96
+ .progress-bar::after {
97
+ content: '';
98
+ position: absolute;
99
+ left: 0;
100
+ top: 0;
101
+ height: 100%;
102
+ width: 0%;
103
+ background-color: #3b82f6;
104
+ transition: width 0.3s ease;
105
+ }
106
+ .progress-bar.active::after {
107
+ width: 100%;
108
+ animation: progress 2s linear infinite;
109
+ }
110
+ @keyframes progress {
111
+ 0% { background-position: 0 0; }
112
+ 100% { background-position: 40px 0; }
113
+ }
114
+ .tab-content {
115
+ display: none;
116
+ }
117
+ .tab-content.active {
118
+ display: block;
119
+ }
120
+ .tooltip {
121
+ position: relative;
122
+ }
123
+ .tooltip:hover .tooltip-text {
124
+ visibility: visible;
125
+ opacity: 1;
126
+ }
127
+ .tooltip-text {
128
+ visibility: hidden;
129
+ width: 120px;
130
+ background-color: #1e293b;
131
+ color: #fff;
132
+ text-align: center;
133
+ border-radius: 6px;
134
+ padding: 5px;
135
+ position: absolute;
136
+ z-index: 1;
137
+ bottom: 125%;
138
+ left: 50%;
139
+ margin-left: -60px;
140
+ opacity: 0;
141
+ transition: opacity 0.3s;
142
+ font-size: 12px;
143
+ }
144
+ </style>
145
+ </head>
146
+ <body class="bg-gray-50 text-gray-800 font-sans">
147
+ <div class="min-h-screen flex flex-col">
148
+ <!-- Header -->
149
+ <header class="bg-white shadow-sm py-4 px-6">
150
+ <div class="container mx-auto flex justify-between items-center">
151
+ <div class="flex items-center space-x-2">
152
+ <div class="w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-700 rounded-md flex items-center justify-center">
153
+ <i class="fas fa-vector-square text-white text-sm"></i>
154
+ </div>
155
+ <h1 class="text-xl font-bold text-gray-800">Vectorware</h1>
156
+ </div>
157
+ <nav class="hidden md:flex space-x-6">
158
+ <a href="#" class="text-blue-600 font-medium">Home</a>
159
+ <a href="#" class="text-gray-600 hover:text-blue-600">Features</a>
160
+ <a href="#" class="text-gray-600 hover:text-blue-600">Pricing</a>
161
+ <a href="#" class="text-gray-600 hover:text-blue-600">Docs</a>
162
+ <a href="#" class="text-gray-600 hover:text-blue-600">Support</a>
163
+ </nav>
164
+ <div class="flex items-center space-x-4">
165
+ <button class="hidden md:block text-gray-600 hover:text-blue-600">
166
+ <i class="fas fa-user-circle text-xl"></i>
167
+ </button>
168
+ <button class="md:hidden text-gray-600">
169
+ <i class="fas fa-bars text-xl"></i>
170
+ </button>
171
+ </div>
172
+ </div>
173
+ </header>
174
+
175
+ <!-- Main Content -->
176
+ <main class="flex-grow container mx-auto px-4 py-8">
177
+ <div class="bg-white rounded-xl shadow-md overflow-hidden">
178
+ <!-- Tabs Navigation -->
179
+ <div class="border-b border-gray-200">
180
+ <nav class="flex -mb-px">
181
+ <button class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-blue-500 text-blue-600" data-tab="upload">
182
+ <i class="fas fa-upload mr-2"></i> Upload Image
183
+ </button>
184
+ <button class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="settings">
185
+ <i class="fas fa-sliders-h mr-2"></i> Vector Settings
186
+ </button>
187
+ <button class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="preview">
188
+ <i class="fas fa-eye mr-2"></i> Preview & Compare
189
+ </button>
190
+ <button class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="edit">
191
+ <i class="fas fa-pen mr-2"></i> Manual Edit
192
+ </button>
193
+ <button class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" data-tab="export">
194
+ <i class="fas fa-download mr-2"></i> Export
195
+ </button>
196
+ </nav>
197
+ </div>
198
+
199
+ <!-- Tab Contents -->
200
+ <div class="p-6">
201
+ <!-- Upload Tab -->
202
+ <div id="upload" class="tab-content active">
203
+ <div class="max-w-3xl mx-auto">
204
+ <h2 class="text-2xl font-bold mb-6">Upload Your Image</h2>
205
+ <p class="text-gray-600 mb-8">Drag and drop your image file here or click to browse. Supported formats: JPEG, PNG, PDF, TIFF, WebP, BMP (Max 100MB)</p>
206
+
207
+ <div class="dropzone rounded-lg p-12 text-center mb-6" id="dropzone">
208
+ <div class="flex flex-col items-center justify-center">
209
+ <i class="fas fa-cloud-upload-alt text-4xl text-blue-500 mb-4"></i>
210
+ <h3 class="text-lg font-medium mb-2">Drag & Drop Your File Here</h3>
211
+ <p class="text-gray-500 mb-4">or</p>
212
+ <button id="browse-button" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-md transition duration-200">
213
+ Browse Files
214
+ </button>
215
+ <input type="file" id="file-input" class="hidden" accept=".jpg,.jpeg,.png,.pdf,.tiff,.webp,.bmp">
216
+ </div>
217
+ </div>
218
+
219
+ <div class="progress-bar mb-6" id="upload-progress"></div>
220
+
221
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
222
+ <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
223
+ <div class="flex items-center mb-3">
224
+ <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
225
+ <i class="fas fa-bolt text-blue-600"></i>
226
+ </div>
227
+ <h3 class="font-medium">Fast Processing</h3>
228
+ </div>
229
+ <p class="text-gray-600 text-sm">Our optimized algorithms vectorize images in seconds, not minutes.</p>
230
+ </div>
231
+ <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
232
+ <div class="flex items-center mb-3">
233
+ <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
234
+ <i class="fas fa-palette text-blue-600"></i>
235
+ </div>
236
+ <h3 class="font-medium">Color Control</h3>
237
+ </div>
238
+ <p class="text-gray-600 text-sm">Precise color extraction with up to 100 colors supported.</p>
239
+ </div>
240
+ <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
241
+ <div class="flex items-center mb-3">
242
+ <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
243
+ <i class="fas fa-expand text-blue-600"></i>
244
+ </div>
245
+ <h3 class="font-medium">Lossless Scaling</h3>
246
+ </div>
247
+ <p class="text-gray-600 text-sm">Vector output can be scaled infinitely without quality loss.</p>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ <!-- Settings Tab -->
254
+ <div id="settings" class="tab-content">
255
+ <div class="max-w-6xl mx-auto">
256
+ <h2 class="text-2xl font-bold mb-6">Vectorization Settings</h2>
257
+ <p class="text-gray-600 mb-8">Adjust the vectorization parameters to get the perfect result for your image.</p>
258
+
259
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
260
+ <!-- Left Column - Settings -->
261
+ <div class="lg:col-span-1">
262
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
263
+ <h3 class="font-medium text-lg mb-4">Color Settings</h3>
264
+
265
+ <div class="mb-6">
266
+ <label class="block text-sm font-medium text-gray-700 mb-2">Color Mode</label>
267
+ <select class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
268
+ <option>Automatic (Recommended)</option>
269
+ <option>Black & White</option>
270
+ <option>2 Colors</option>
271
+ <option>8 Colors</option>
272
+ <option>16 Colors</option>
273
+ <option>32 Colors</option>
274
+ <option>64 Colors</option>
275
+ <option>100 Colors</option>
276
+ <option>Full Color (Experimental)</option>
277
+ </select>
278
+ </div>
279
+
280
+ <div class="mb-6">
281
+ <label class="block text-sm font-medium text-gray-700 mb-2">Custom Color Count</label>
282
+ <div class="flex items-center space-x-4">
283
+ <input type="range" min="2" max="100" value="16" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
284
+ <span class="text-sm font-medium text-gray-700 w-10 text-center">16</span>
285
+ </div>
286
+ </div>
287
+
288
+ <div class="mb-6">
289
+ <label class="flex items-center space-x-3">
290
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
291
+ <span class="text-gray-700">Preserve transparency</span>
292
+ </label>
293
+ </div>
294
+
295
+ <div class="mb-6">
296
+ <label class="flex items-center space-x-3">
297
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
298
+ <span class="text-gray-700">Auto-detect background</span>
299
+ </label>
300
+ </div>
301
+
302
+ <h3 class="font-medium text-lg mb-4 mt-8">Path Settings</h3>
303
+
304
+ <div class="mb-6">
305
+ <label class="block text-sm font-medium text-gray-700 mb-2">Path Detail</label>
306
+ <div class="flex items-center space-x-4">
307
+ <span class="text-sm text-gray-500">Low</span>
308
+ <input type="range" min="1" max="10" value="6" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
309
+ <span class="text-sm text-gray-500">High</span>
310
+ </div>
311
+ </div>
312
+
313
+ <div class="mb-6">
314
+ <label class="flex items-center space-x-3">
315
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
316
+ <span class="text-gray-700">Smooth curves</span>
317
+ </label>
318
+ </div>
319
+
320
+ <div class="mb-6">
321
+ <label class="flex items-center space-x-3">
322
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
323
+ <span class="text-gray-700">Corner snapping</span>
324
+ </label>
325
+ </div>
326
+
327
+ <div class="mb-6">
328
+ <label class="flex items-center space-x-3">
329
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
330
+ <span class="text-gray-700">Optimize paths</span>
331
+ </label>
332
+ </div>
333
+
334
+ <button id="process-button" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-md transition duration-200">
335
+ Process Image
336
+ </button>
337
+ </div>
338
+ </div>
339
+
340
+ <!-- Right Column - Preview -->
341
+ <div class="lg:col-span-2">
342
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
343
+ <h3 class="font-medium text-lg mb-4">Preview</h3>
344
+
345
+ <div class="flex justify-between items-center mb-4">
346
+ <div class="flex space-x-2">
347
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
348
+ Original
349
+ </button>
350
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
351
+ Vector
352
+ </button>
353
+ <button class="bg-blue-100 border border-blue-200 text-blue-700 rounded-md px-3 py-1 text-sm font-medium">
354
+ Side by Side
355
+ </button>
356
+ </div>
357
+
358
+ <div class="flex items-center space-x-2">
359
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
360
+ <i class="fas fa-search-minus"></i>
361
+ <span class="tooltip-text">Zoom Out</span>
362
+ </button>
363
+ <span class="text-sm text-gray-600">100%</span>
364
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
365
+ <i class="fas fa-search-plus"></i>
366
+ <span class="tooltip-text">Zoom In</span>
367
+ </button>
368
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
369
+ <i class="fas fa-expand"></i>
370
+ <span class="tooltip-text">Fit to View</span>
371
+ </button>
372
+ </div>
373
+ </div>
374
+
375
+ <div class="canvas-container rounded-md overflow-hidden border border-gray-300" style="height: 500px;">
376
+ <div class="comparison-slider">
377
+ <input type="range" min="1" max="100" value="50" class="slider" id="comparison-slider">
378
+ <div class="slider-line"></div>
379
+ <div class="slider-handle">
380
+ <i class="fas fa-arrows-alt-h text-xs"></i>
381
+ </div>
382
+
383
+ <div class="absolute inset-0 flex">
384
+ <div class="w-1/2 h-full bg-gray-100 flex items-center justify-center">
385
+ <img id="original-image" src="https://via.placeholder.com/800x500?text=Original+Image" alt="Original" class="max-w-full max-h-full">
386
+ </div>
387
+ <div class="w-1/2 h-full bg-gray-100 flex items-center justify-center">
388
+ <img id="vector-preview" src="https://via.placeholder.com/800x500?text=Vector+Preview" alt="Vector" class="max-w-full max-h-full">
389
+ </div>
390
+ </div>
391
+ </div>
392
+
393
+ <div class="zoom-controls">
394
+ <div class="flex divide-x divide-gray-200">
395
+ <button class="p-2 text-gray-600 hover:text-blue-600">
396
+ <i class="fas fa-search-minus"></i>
397
+ </button>
398
+ <button class="p-2 text-gray-600 hover:text-blue-600">
399
+ <i class="fas fa-search-plus"></i>
400
+ </button>
401
+ <button class="p-2 text-gray-600 hover:text-blue-600">
402
+ <i class="fas fa-expand"></i>
403
+ </button>
404
+ </div>
405
+ </div>
406
+ </div>
407
+
408
+ <div class="mt-4">
409
+ <h4 class="text-sm font-medium text-gray-700 mb-2">Detected Colors</h4>
410
+ <div class="flex flex-wrap gap-2">
411
+ <div class="color-chip" style="background-color: #3b82f6;" title="#3b82f6"></div>
412
+ <div class="color-chip" style="background-color: #ef4444;" title="#ef4444"></div>
413
+ <div class="color-chip" style="background-color: #10b981;" title="#10b981"></div>
414
+ <div class="color-chip" style="background-color: #f59e0b;" title="#f59e0b"></div>
415
+ <div class="color-chip" style="background-color: #8b5cf6;" title="#8b5cf6"></div>
416
+ <div class="color-chip" style="background-color: #ec4899;" title="#ec4899"></div>
417
+ <div class="color-chip" style="background-color: #000000;" title="#000000"></div>
418
+ <div class="color-chip" style="background-color: #ffffff;" title="#ffffff"></div>
419
+ <div class="color-chip selected" style="background-color: #64748b;" title="#64748b"></div>
420
+ <div class="color-chip" style="background-color: #f97316;" title="#f97316"></div>
421
+ <div class="color-chip" style="background-color: #14b8a6;" title="#14b8a6"></div>
422
+ <div class="color-chip" style="background-color: #6366f1;" title="#6366f1"></div>
423
+ <button class="text-xs text-gray-500 hover:text-blue-600 flex items-center">
424
+ <i class="fas fa-plus mr-1"></i> Add
425
+ </button>
426
+ </div>
427
+ </div>
428
+ </div>
429
+ </div>
430
+ </div>
431
+ </div>
432
+ </div>
433
+
434
+ <!-- Preview & Compare Tab -->
435
+ <div id="preview" class="tab-content">
436
+ <div class="max-w-6xl mx-auto">
437
+ <h2 class="text-2xl font-bold mb-6">Preview & Compare</h2>
438
+ <p class="text-gray-600 mb-8">Inspect your vectorized image and compare it with the original.</p>
439
+
440
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
441
+ <!-- Left Column - Controls -->
442
+ <div class="lg:col-span-1">
443
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
444
+ <h3 class="font-medium text-lg mb-4">Comparison Mode</h3>
445
+
446
+ <div class="space-y-3 mb-6">
447
+ <label class="flex items-center space-x-3 p-2 rounded hover:bg-gray-100 cursor-pointer">
448
+ <input type="radio" name="comparison-mode" class="form-radio h-4 w-4 text-blue-600" checked>
449
+ <span class="text-gray-700">Side by Side</span>
450
+ </label>
451
+ <label class="flex items-center space-x-3 p-2 rounded hover:bg-gray-100 cursor-pointer">
452
+ <input type="radio" name="comparison-mode" class="form-radio h-4 w-4 text-blue-600">
453
+ <span class="text-gray-700">Overlay (Slider)</span>
454
+ </label>
455
+ <label class="flex items-center space-x-3 p-2 rounded hover:bg-gray-100 cursor-pointer">
456
+ <input type="radio" name="comparison-mode" class="form-radio h-4 w-4 text-blue-600">
457
+ <span class="text-gray-700">Difference Map</span>
458
+ </label>
459
+ <label class="flex items-center space-x-3 p-2 rounded hover:bg-gray-100 cursor-pointer">
460
+ <input type="radio" name="comparison-mode" class="form-radio h-4 w-4 text-blue-600">
461
+ <span class="text-gray-700">Toggle Flicker</span>
462
+ </label>
463
+ </div>
464
+
465
+ <h3 class="font-medium text-lg mb-4 mt-8">View Options</h3>
466
+
467
+ <div class="mb-6">
468
+ <label class="flex items-center space-x-3">
469
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
470
+ <span class="text-gray-700">Show grid</span>
471
+ </label>
472
+ </div>
473
+
474
+ <div class="mb-6">
475
+ <label class="flex items-center space-x-3">
476
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
477
+ <span class="text-gray-700">Show paths</span>
478
+ </label>
479
+ </div>
480
+
481
+ <div class="mb-6">
482
+ <label class="flex items-center space-x-3">
483
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
484
+ <span class="text-gray-700">Show color regions</span>
485
+ </label>
486
+ </div>
487
+
488
+ <div class="mb-6">
489
+ <label class="block text-sm font-medium text-gray-700 mb-2">Zoom Level</label>
490
+ <div class="flex items-center space-x-4">
491
+ <button class="p-1 text-gray-600 hover:text-blue-600">
492
+ <i class="fas fa-search-minus"></i>
493
+ </button>
494
+ <select class="flex-grow border border-gray-300 rounded-md py-1 px-2 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500">
495
+ <option>Fit to View</option>
496
+ <option>25%</option>
497
+ <option>50%</option>
498
+ <option selected>100%</option>
499
+ <option>200%</option>
500
+ <option>400%</option>
501
+ <option>800%</option>
502
+ </select>
503
+ <button class="p-1 text-gray-600 hover:text-blue-600">
504
+ <i class="fas fa-search-plus"></i>
505
+ </button>
506
+ </div>
507
+ </div>
508
+
509
+ <h3 class="font-medium text-lg mb-4 mt-8">Color Management</h3>
510
+
511
+ <div class="mb-4">
512
+ <label class="block text-sm font-medium text-gray-700 mb-2">Active Color</label>
513
+ <div class="flex items-center space-x-3">
514
+ <div class="color-chip selected" style="background-color: #64748b;"></div>
515
+ <div class="text-sm">
516
+ <div>#64748b</div>
517
+ <div class="text-gray-500">5.2% coverage</div>
518
+ </div>
519
+ </div>
520
+ </div>
521
+
522
+ <div class="space-y-2 mb-6">
523
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
524
+ <span>Show/Hide</span>
525
+ <i class="fas fa-eye"></i>
526
+ </button>
527
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
528
+ <span>Edit Color</span>
529
+ <i class="fas fa-pencil-alt"></i>
530
+ </button>
531
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
532
+ <span>Merge with...</span>
533
+ <i class="fas fa-object-group"></i>
534
+ </button>
535
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100 text-red-500">
536
+ <span>Delete Color</span>
537
+ <i class="fas fa-trash"></i>
538
+ </button>
539
+ </div>
540
+ </div>
541
+ </div>
542
+
543
+ <!-- Right Column - Comparison -->
544
+ <div class="lg:col-span-2">
545
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
546
+ <div class="flex justify-between items-center mb-4">
547
+ <div class="flex space-x-2">
548
+ <button class="bg-blue-100 border border-blue-200 text-blue-700 rounded-md px-3 py-1 text-sm font-medium">
549
+ Side by Side
550
+ </button>
551
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
552
+ Overlay
553
+ </button>
554
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
555
+ Difference
556
+ </button>
557
+ </div>
558
+
559
+ <div class="flex items-center space-x-2">
560
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
561
+ <i class="fas fa-search-minus"></i>
562
+ <span class="tooltip-text">Zoom Out</span>
563
+ </button>
564
+ <span class="text-sm text-gray-600">100%</span>
565
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
566
+ <i class="fas fa-search-plus"></i>
567
+ <span class="tooltip-text">Zoom In</span>
568
+ </button>
569
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
570
+ <i class="fas fa-expand"></i>
571
+ <span class="tooltip-text">Fit to View</span>
572
+ </button>
573
+ </div>
574
+ </div>
575
+
576
+ <div class="canvas-container rounded-md overflow-hidden border border-gray-300" style="height: 500px;">
577
+ <div class="absolute inset-0 flex">
578
+ <div class="w-1/2 h-full bg-gray-100 flex items-center justify-center border-r border-gray-300">
579
+ <img id="original-image-preview" src="https://via.placeholder.com/800x500?text=Original+Image" alt="Original" class="max-w-full max-h-full">
580
+ </div>
581
+ <div class="w-1/2 h-full bg-gray-100 flex items-center justify-center">
582
+ <img id="vector-image-preview" src="https://via.placeholder.com/800x500?text=Vector+Result" alt="Vector" class="max-w-full max-h-full">
583
+ </div>
584
+ </div>
585
+
586
+ <div class="zoom-controls">
587
+ <div class="flex divide-x divide-gray-200">
588
+ <button class="p-2 text-gray-600 hover:text-blue-600">
589
+ <i class="fas fa-search-minus"></i>
590
+ </button>
591
+ <button class="p-2 text-gray-600 hover:text-blue-600">
592
+ <i class="fas fa-search-plus"></i>
593
+ </button>
594
+ <button class="p-2 text-gray-600 hover:text-blue-600">
595
+ <i class="fas fa-expand"></i>
596
+ </button>
597
+ </div>
598
+ </div>
599
+ </div>
600
+
601
+ <div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-4">
602
+ <div class="bg-white p-4 rounded-lg border border-gray-200">
603
+ <h4 class="font-medium text-sm mb-2">Original Image</h4>
604
+ <div class="text-xs text-gray-600 space-y-1">
605
+ <div class="flex justify-between">
606
+ <span>Dimensions:</span>
607
+ <span>1200 × 800 px</span>
608
+ </div>
609
+ <div class="flex justify-between">
610
+ <span>File size:</span>
611
+ <span>450 KB</span>
612
+ </div>
613
+ <div class="flex justify-between">
614
+ <span>Colors:</span>
615
+ <span>~16,000</span>
616
+ </div>
617
+ <div class="flex justify-between">
618
+ <span>Format:</span>
619
+ <span>JPEG</span>
620
+ </div>
621
+ </div>
622
+ </div>
623
+ <div class="bg-white p-4 rounded-lg border border-gray-200">
624
+ <h4 class="font-medium text-sm mb-2">Vector Result</h4>
625
+ <div class="text-xs text-gray-600 space-y-1">
626
+ <div class="flex justify-between">
627
+ <span>Dimensions:</span>
628
+ <span>Scalable</span>
629
+ </div>
630
+ <div class="flex justify-between">
631
+ <span>File size:</span>
632
+ <span>78 KB (estimated)</span>
633
+ </div>
634
+ <div class="flex justify-between">
635
+ <span>Colors:</span>
636
+ <span>16</span>
637
+ </div>
638
+ <div class="flex justify-between">
639
+ <span>Paths:</span>
640
+ <span>~320</span>
641
+ </div>
642
+ </div>
643
+ </div>
644
+ </div>
645
+ </div>
646
+ </div>
647
+ </div>
648
+ </div>
649
+ </div>
650
+
651
+ <!-- Manual Edit Tab -->
652
+ <div id="edit" class="tab-content">
653
+ <div class="max-w-6xl mx-auto">
654
+ <h2 class="text-2xl font-bold mb-6">Manual Editing</h2>
655
+ <p class="text-gray-600 mb-8">Fine-tune your vector paths and colors for perfect results.</p>
656
+
657
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
658
+ <!-- Left Column - Tools -->
659
+ <div class="lg:col-span-1">
660
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
661
+ <h3 class="font-medium text-lg mb-4">Editing Tools</h3>
662
+
663
+ <div class="grid grid-cols-4 gap-2 mb-6">
664
+ <button class="p-2 bg-blue-100 border border-blue-200 rounded-md text-blue-700 tooltip">
665
+ <i class="fas fa-mouse-pointer"></i>
666
+ <span class="tooltip-text">Select Tool</span>
667
+ </button>
668
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
669
+ <i class="fas fa-pen"></i>
670
+ <span class="tooltip-text">Pen Tool</span>
671
+ </button>
672
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
673
+ <i class="fas fa-vector-square"></i>
674
+ <span class="tooltip-text">Rectangle</span>
675
+ </button>
676
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
677
+ <i class="fas fa-circle"></i>
678
+ <span class="tooltip-text">Ellipse</span>
679
+ </button>
680
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
681
+ <i class="fas fa-font"></i>
682
+ <span class="tooltip-text">Text</span>
683
+ </button>
684
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
685
+ <i class="fas fa-cut"></i>
686
+ <span class="tooltip-text">Knife</span>
687
+ </button>
688
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
689
+ <i class="fas fa-tint"></i>
690
+ <span class="tooltip-text">Paint Bucket</span>
691
+ </button>
692
+ <button class="p-2 bg-white border border-gray-300 rounded-md hover:bg-gray-50 tooltip">
693
+ <i class="fas fa-eye-dropper"></i>
694
+ <span class="tooltip-text">Eyedropper</span>
695
+ </button>
696
+ </div>
697
+
698
+ <h3 class="font-medium text-lg mb-4">Path Options</h3>
699
+
700
+ <div class="mb-6">
701
+ <label class="block text-sm font-medium text-gray-700 mb-2">Stroke Width</label>
702
+ <div class="flex items-center space-x-4">
703
+ <input type="range" min="0" max="20" value="1" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
704
+ <span class="text-sm font-medium text-gray-700 w-10 text-center">1px</span>
705
+ </div>
706
+ </div>
707
+
708
+ <div class="mb-6">
709
+ <label class="block text-sm font-medium text-gray-700 mb-2">Corner Type</label>
710
+ <select class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
711
+ <option>Miter Join</option>
712
+ <option>Round Join</option>
713
+ <option>Bevel Join</option>
714
+ </select>
715
+ </div>
716
+
717
+ <div class="mb-6">
718
+ <label class="flex items-center space-x-3">
719
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
720
+ <span class="text-gray-700">Show anchor points</span>
721
+ </label>
722
+ </div>
723
+
724
+ <div class="mb-6">
725
+ <label class="flex items-center space-x-3">
726
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
727
+ <span class="text-gray-700">Snap to grid</span>
728
+ </label>
729
+ </div>
730
+
731
+ <h3 class="font-medium text-lg mb-4">History</h3>
732
+
733
+ <div class="space-y-2 mb-6">
734
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
735
+ <span>Added path #321</span>
736
+ <span class="text-gray-500 text-xs">2 sec ago</span>
737
+ </button>
738
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
739
+ <span>Modified color #5</span>
740
+ <span class="text-gray-500 text-xs">15 sec ago</span>
741
+ </button>
742
+ <button class="w-full flex items-center justify-between text-sm p-2 rounded hover:bg-gray-100">
743
+ <span>Simplified paths</span>
744
+ <span class="text-gray-500 text-xs">1 min ago</span>
745
+ </button>
746
+ </div>
747
+
748
+ <div class="flex space-x-2">
749
+ <button class="flex-1 bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-md transition duration-200">
750
+ Undo
751
+ </button>
752
+ <button class="flex-1 bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-md transition duration-200">
753
+ Redo
754
+ </button>
755
+ </div>
756
+ </div>
757
+ </div>
758
+
759
+ <!-- Middle Column - Canvas -->
760
+ <div class="lg:col-span-2">
761
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
762
+ <div class="flex justify-between items-center mb-4">
763
+ <div class="flex space-x-2">
764
+ <button class="bg-blue-100 border border-blue-200 text-blue-700 rounded-md px-3 py-1 text-sm font-medium">
765
+ <i class="fas fa-mouse-pointer mr-1"></i> Select
766
+ </button>
767
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
768
+ <i class="fas fa-pen mr-1"></i> Pen
769
+ </button>
770
+ <button class="bg-white border border-gray-300 rounded-md px-3 py-1 text-sm font-medium hover:bg-gray-50">
771
+ <i class="fas fa-tint mr-1"></i> Fill
772
+ </button>
773
+ </div>
774
+
775
+ <div class="flex items-center space-x-2">
776
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
777
+ <i class="fas fa-search-minus"></i>
778
+ <span class="tooltip-text">Zoom Out</span>
779
+ </button>
780
+ <span class="text-sm text-gray-600">200%</span>
781
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
782
+ <i class="fas fa-search-plus"></i>
783
+ <span class="tooltip-text">Zoom In</span>
784
+ </button>
785
+ <button class="tooltip p-2 text-gray-600 hover:text-blue-600">
786
+ <i class="fas fa-expand"></i>
787
+ <span class="tooltip-text">Fit to View</span>
788
+ </button>
789
+ </div>
790
+ </div>
791
+
792
+ <div class="canvas-container rounded-md overflow-hidden border border-gray-300" style="height: 500px;">
793
+ <svg id="vector-canvas" width="100%" height="100%" viewBox="0 0 800 500" xmlns="http://www.w3.org/2000/svg">
794
+ <!-- Background -->
795
+ <rect width="100%" height="100%" fill="#f8fafc" />
796
+
797
+ <!-- Example vector paths -->
798
+ <path d="M100,100 L200,100 L200,200 L100,200 Z" fill="#3b82f6" stroke="#1d4ed8" stroke-width="1" />
799
+ <path d="M250,150 C300,50 350,250 400,150" fill="none" stroke="#ef4444" stroke-width="2" />
800
+ <path d="M450,100 L550,100 L500,200 Z" fill="#10b981" stroke="#047857" stroke-width="1" />
801
+ <circle cx="600" cy="150" r="50" fill="#f59e0b" stroke="#b45309" stroke-width="1" />
802
+
803
+ <!-- Anchor points (visible when selected) -->
804
+ <circle cx="100" cy="100" r="4" fill="#1e40af" class="anchor-point" style="display: none;" />
805
+ <circle cx="200" cy="100" r="4" fill="#1e40af" class="anchor-point" style="display: none;" />
806
+ <circle cx="200" cy="200" r="4" fill="#1e40af" class="anchor-point" style="display: none;" />
807
+ <circle cx="100" cy="200" r="4" fill="#1e40af" class="anchor-point" style="display: none;" />
808
+ </svg>
809
+
810
+ <div class="zoom-controls">
811
+ <div class="flex divide-x divide-gray-200">
812
+ <button class="p-2 text-gray-600 hover:text-blue-600">
813
+ <i class="fas fa-search-minus"></i>
814
+ </button>
815
+ <button class="p-2 text-gray-600 hover:text-blue-600">
816
+ <i class="fas fa-search-plus"></i>
817
+ </button>
818
+ <button class="p-2 text-gray-600 hover:text-blue-600">
819
+ <i class="fas fa-expand"></i>
820
+ </button>
821
+ </div>
822
+ </div>
823
+ </div>
824
+
825
+ <div class="mt-6">
826
+ <h4 class="font-medium text-sm mb-2">Selected Path</h4>
827
+ <div class="bg-white p-4 rounded-lg border border-gray-200">
828
+ <div class="grid grid-cols-2 gap-4 mb-4">
829
+ <div>
830
+ <label class="block text-xs font-medium text-gray-700 mb-1">Fill</label>
831
+ <div class="flex items-center">
832
+ <div class="color-chip mr-2" style="background-color: #3b82f6;"></div>
833
+ <input type="text" value="#3b82f6" class="text-xs border border-gray-300 rounded px-2 py-1 w-20">
834
+ </div>
835
+ </div>
836
+ <div>
837
+ <label class="block text-xs font-medium text-gray-700 mb-1">Stroke</label>
838
+ <div class="flex items-center">
839
+ <div class="color-chip mr-2" style="background-color: #1d4ed8;"></div>
840
+ <input type="text" value="#1d4ed8" class="text-xs border border-gray-300 rounded px-2 py-1 w-20">
841
+ </div>
842
+ </div>
843
+ </div>
844
+
845
+ <div class="flex space-x-2">
846
+ <button class="flex-1 bg-gray-200 hover:bg-gray-300 text-gray-800 text-xs font-medium py-1 px-2 rounded transition duration-200">
847
+ <i class="fas fa-copy mr-1"></i> Copy
848
+ </button>
849
+ <button class="flex-1 bg-gray-200 hover:bg-gray-300 text-gray-800 text-xs font-medium py-1 px-2 rounded transition duration-200">
850
+ <i class="fas fa-paste mr-1"></i> Paste
851
+ </button>
852
+ <button class="flex-1 bg-red-100 hover:bg-red-200 text-red-800 text-xs font-medium py-1 px-2 rounded transition duration-200">
853
+ <i class="fas fa-trash mr-1"></i> Delete
854
+ </button>
855
+ </div>
856
+ </div>
857
+ </div>
858
+ </div>
859
+ </div>
860
+ </div>
861
+ </div>
862
+ </div>
863
+
864
+ <!-- Export Tab -->
865
+ <div id="export" class="tab-content">
866
+ <div class="max-w-3xl mx-auto">
867
+ <h2 class="text-2xl font-bold mb-6">Export Vector Image</h2>
868
+ <p class="text-gray-600 mb-8">Choose your preferred format and settings for exporting the vectorized image.</p>
869
+
870
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200 mb-8">
871
+ <h3 class="font-medium text-lg mb-4">Export Settings</h3>
872
+
873
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
874
+ <div>
875
+ <label class="block text-sm font-medium text-gray-700 mb-2">Format</label>
876
+ <select class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
877
+ <option>SVG (Scalable Vector Graphics)</option>
878
+ <option>PDF (Portable Document Format)</option>
879
+ <option>EPS (Encapsulated PostScript)</option>
880
+ <option>PNG (Raster Preview)</option>
881
+ <option>JPEG (Raster Preview)</option>
882
+ </select>
883
+ </div>
884
+ <div>
885
+ <label class="block text-sm font-medium text-gray-700 mb-2">Resolution (for raster formats)</label>
886
+ <select class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
887
+ <option>72 DPI (Web)</option>
888
+ <option>150 DPI (Medium Quality)</option>
889
+ <option selected>300 DPI (High Quality)</option>
890
+ <option>600 DPI (Ultra Quality)</option>
891
+ </select>
892
+ </div>
893
+ </div>
894
+
895
+ <div class="mb-6">
896
+ <label class="block text-sm font-medium text-gray-700 mb-2">File Name</label>
897
+ <input type="text" value="vectorized-image" class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
898
+ </div>
899
+
900
+ <div class="space-y-3 mb-6">
901
+ <label class="flex items-center space-x-3">
902
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
903
+ <span class="text-gray-700">Include metadata (author, creation date)</span>
904
+ </label>
905
+ <label class="flex items-center space-x-3">
906
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded" checked>
907
+ <span class="text-gray-700">Embed color profile</span>
908
+ </label>
909
+ <label class="flex items-center space-x-3">
910
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
911
+ <span class="text-gray-700">Flatten all layers</span>
912
+ </label>
913
+ </div>
914
+
915
+ <div class="flex space-x-4">
916
+ <button class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-md transition duration-200">
917
+ <i class="fas fa-download mr-2"></i> Download Now
918
+ </button>
919
+ <button class="bg-white border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-6 rounded-md transition duration-200">
920
+ <i class="fas fa-save mr-2"></i> Save to Project
921
+ </button>
922
+ </div>
923
+ </div>
924
+
925
+ <div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
926
+ <h3 class="font-medium text-lg mb-4">Batch Export</h3>
927
+ <p class="text-gray-600 mb-6">Export multiple formats at once or prepare files for bulk download.</p>
928
+
929
+ <div class="space-y-3 mb-6">
930
+ <label class="flex items-center space-x-3 p-3 rounded border border-gray-200 hover:bg-gray-100 cursor-pointer">
931
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
932
+ <div>
933
+ <div class="font-medium">SVG + PNG</div>
934
+ <div class="text-xs text-gray-500">Vector with raster preview</div>
935
+ </div>
936
+ </label>
937
+ <label class="flex items-center space-x-3 p-3 rounded border border-gray-200 hover:bg-gray-100 cursor-pointer">
938
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
939
+ <div>
940
+ <div class="font-medium">PDF + EPS</div>
941
+ <div class="text-xs text-gray-500">Print-ready formats</div>
942
+ </div>
943
+ </label>
944
+ <label class="flex items-center space-x-3 p-3 rounded border border-gray-200 hover:bg-gray-100 cursor-pointer">
945
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-blue-600 rounded">
946
+ <div>
947
+ <div class="font-medium">All Formats</div>
948
+ <div class="text-xs text-gray-500">SVG, PDF, EPS, PNG, JPEG</div>
949
+ </div>
950
+ </label>
951
+ </div>
952
+
953
+ <button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-md transition duration-200">
954
+ <i class="fas fa-file-archive mr-2"></i> Download as ZIP
955
+ </button>
956
+ </div>
957
+ </div>
958
+ </div>
959
+ </div>
960
+ </div>
961
+ </main>
962
+
963
+ <!-- Footer -->
964
+ <footer class="bg-white border-t border-gray-200 py-8 px-6">
965
+ <div class="container mx-auto">
966
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
967
+ <div>
968
+ <h3 class="text-lg font-medium mb-4">Vectorware</h3>
969
+ <p class="text-gray-600 text-sm">Professional image vectorization software for designers, artists, and engineers.</p>
970
+ </div>
971
+ <div>
972
+ <h3 class="text-lg font-medium mb-4">Product</h3>
973
+ <ul class="space-y-2 text-sm text-gray-600">
974
+ <li><a href="#" class="hover:text-blue-600">Features</a></li>
975
+ <li><a href="#" class="hover:text-blue-600">Pricing</a></li>
976
+ <li><a href="#" class="hover:text-blue-600">Examples</a></li>
977
+ <li><a href="#" class="hover:text-blue-600">Updates</a></li>
978
+ </ul>
979
+ </div>
980
+ <div>
981
+ <h3 class="text-lg font-medium mb-4">Resources</h3>
982
+ <ul class="space-y-2 text-sm text-gray-600">
983
+ <li><a href="#" class="hover:text-blue-600">Documentation</a></li>
984
+ <li><a href="#" class="hover:text-blue-600">Tutorials</a></li>
985
+ <li><a href="#" class="hover:text-blue-600">Blog</a></li>
986
+ <li><a href="#" class="hover:text-blue-600">Support</a></li>
987
+ </ul>
988
+ </div>
989
+ <div>
990
+ <h3 class="text-lg font-medium mb-4">Company</h3>
991
+ <ul class="space-y-2 text-sm text-gray-600">
992
+ <li><a href="#" class="hover:text-blue-600">About</a></li>
993
+ <li><a href="#" class="hover:text-blue-600">Careers</a></li>
994
+ <li><a href="#" class="hover:text-blue-600">Privacy</a></li>
995
+ <li><a href="#" class="hover:text-blue-600">Terms</a></li>
996
+ </ul>
997
+ </div>
998
+ </div>
999
+ <div class="border-t border-gray-200 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center">
1000
+ <p class="text-sm text-gray-500 mb-4 md:mb-0">© 2023 Vectorware. All rights reserved.</p>
1001
+ <div class="flex space-x-6">
1002
+ <a href="#" class="text-gray-400 hover:text-blue-600">
1003
+ <i class="fab fa-twitter"></i>
1004
+ </a>
1005
+ <a href="#" class="text-gray-400 hover:text-blue-600">
1006
+ <i class="fab fa-facebook-f"></i>
1007
+ </a>
1008
+ <a href="#" class="text-gray-400 hover:text-blue-600">
1009
+ <i class="fab fa-instagram"></i>
1010
+ </a>
1011
+ <a href="#" class="text-gray-400 hover:text-blue-600">
1012
+ <i class="fab fa-github"></i>
1013
+ </a>
1014
+ </div>
1015
+ </div>
1016
+ </div>
1017
+ </footer>
1018
+ </div>
1019
+
1020
+ <script>
1021
+ // Tab switching functionality
1022
+ document.querySelectorAll('.tab-button').forEach(button => {
1023
+ button.addEventListener('click', () => {
1024
+ // Remove active class from all tabs and buttons
1025
+ document.querySelectorAll('.tab-button').forEach(btn => {
1026
+ btn.classList.remove('border-blue-500', 'text-blue-600');
1027
+ btn.classList.add('border-transparent', 'text-gray-500');
1028
+ });
1029
+
1030
+ document.querySelectorAll('.tab-content').forEach(tab => {
1031
+ tab.classList.remove('active');
1032
+ });
1033
+
1034
+ // Add active class to clicked button and corresponding tab
1035
+ button.classList.remove('border-transparent', 'text-gray-500');
1036
+ button.classList.add('border-blue-500', 'text-blue-600');
1037
+
1038
+ const tabId = button.getAttribute('data-tab');
1039
+ document.getElementById(tabId).classList.add('active');
1040
+ });
1041
+ });
1042
+
1043
+ // File upload functionality
1044
+ const dropzone = document.getElementById('dropzone');
1045
+ const fileInput = document.getElementById('file-input');
1046
+ const browseButton = document.getElementById('browse-button');
1047
+ const uploadProgress = document.getElementById('upload-progress');
1048
+
1049
+ // Highlight dropzone when file is dragged over
1050
+ ['dragenter', 'dragover'].forEach(eventName => {
1051
+ dropzone.addEventListener(eventName, (e) => {
1052
+ e.preventDefault();
1053
+ dropzone.classList.add('active');
1054
+ });
1055
+ });
1056
+
1057
+ // Remove highlight when file leaves
1058
+ ['dragleave', 'drop'].forEach(eventName => {
1059
+ dropzone.addEventListener(eventName, (e) => {
1060
+ e.preventDefault();
1061
+ dropzone.classList.remove('active');
1062
+ });
1063
+ });
1064
+
1065
+ // Handle dropped files
1066
+ dropzone.addEventListener('drop', (e) => {
1067
+ e.preventDefault();
1068
+ const files = e.dataTransfer.files;
1069
+ if (files.length) {
1070
+ handleFiles(files);
1071
+ }
1072
+ });
1073
+
1074
+ // Handle clicked files
1075
+ browseButton.addEventListener('click', () => {
1076
+ fileInput.click();
1077
+ });
1078
+
1079
+ fileInput.addEventListener('change', () => {
1080
+ if (fileInput.files.length) {
1081
+ handleFiles(fileInput.files);
1082
+ }
1083
+ });
1084
+
1085
+ // Process uploaded files
1086
+ function handleFiles(files) {
1087
+ const file = files[0];
1088
+ const validTypes = ['image/jpeg', 'image/png', 'image/pdf', 'image/tiff', 'image/webp', 'image/bmp'];
1089
+
1090
+ if (!validTypes.includes(file.type) && !file.name.match(/\.(jpe?g|png|pdf|tiff?|webp|bmp)$/i)) {
1091
+ alert('Please upload a valid image file (JPEG, PNG, PDF, TIFF, WebP, BMP)');
1092
+ return;
1093
+ }
1094
+
1095
+ if (file.size > 100 * 1024 * 1024) { // 100MB
1096
+ alert('File size exceeds 100MB limit');
1097
+ return;
1098
+ }
1099
+
1100
+ // Simulate upload progress
1101
+ uploadProgress.classList.add('active');
1102
+
1103
+ // In a real app, you would upload the file to your server here
1104
+ setTimeout(() => {
1105
+ uploadProgress.classList.remove('active');
1106
+
1107
+ // Switch to the settings tab
1108
+ document.querySelector('[data-tab="settings"]').click();
1109
+
1110
+ // Display the uploaded image
1111
+ const reader = new FileReader();
1112
+ reader.onload = (e) => {
1113
+ document.getElementById('original-image').src = e.target.result;
1114
+ document.getElementById('original-image-preview').src = e.target.result;
1115
+
1116
+ // In a real app, you would process the image and display the vector preview
1117
+ // For demo purposes, we'll just use a placeholder
1118
+ document.getElementById('vector-preview').src = e.target.result;
1119
+ document.getElementById('vector-image-preview').src = e.target.result;
1120
+ };
1121
+ reader.readAsDataURL(file);
1122
+ }, 1500);
1123
+ }
1124
+
1125
+ // Process button click
1126
+ document.getElementById('process-button').addEventListener('click', () => {
1127
+ // In a real app, this would send the settings to your backend for processing
1128
+ // For demo purposes, we'll just switch to the preview tab
1129
+ document.querySelector('[data-tab="preview"]').click();
1130
+ });
1131
+
1132
+ // Comparison slider functionality
1133
+ const slider = document.getElementById('comparison-slider');
1134
+ if (slider) {
1135
+ slider.addEventListener('input', (e) => {
1136
+ const value = e.target.value;
1137
+ document.querySelector('.comparison-slider .slider-line').style.left = `${value}%`;
1138
+ document.querySelector('.comparison-slider .slider-handle').style.left = `${value}%`;
1139
+ });
1140
+ }
1141
+
1142
+ // Manual edit canvas interaction
1143
+ const vectorCanvas = document.getElementById('vector-canvas');
1144
+ if (vectorCanvas) {
1145
+ // Example: Show anchor points when path is clicked
1146
+ vectorCanvas.addEventListener('click', (e) => {
1147
+ if (e.target.tagName === 'path') {
1148
+ // Hide all anchor points first
1149
+ document.querySelectorAll('.anchor-point').forEach(point => {
1150
+ point.style.display = 'none';
1151
+ });
1152
+
1153
+ // Show anchor points for this path
1154
+ // In a real app, you would calculate these based on the path data
1155
+ const path = e.target;
1156
+ if (path.getAttribute('d').includes('100,100')) {
1157
+ document.querySelectorAll('.anchor-point').forEach(point => {
1158
+ point.style.display = 'block';
1159
+ });
1160
+ }
1161
+ }
1162
+ });
1163
+ }
1164
+ </script>
1165
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=marcosyago/vectorware" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1166
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Act like a senior full-stack developer and computer vision expert who has been building advanced image processing tools and creative design software for over 15 years. You are highly experienced in working with SVG generation, vector mathematics, and real-time image comparison frameworks. You are now tasked with building a world-class image vectorisation application called "Vectorware" — highly accurate, fast, and fully interactive. Objective Create a high-performance image vectoriser web app that allows users to upload raster image files (JPEG, PNG, PDF, TIFF, WebP, etc.), convert them into high-fidelity vector graphics, and export them in multiple formats. The tool must rival the precision and editing flexibility of VectorMagic.com, with real-time previews, side-by-side comparison tools, manual cleanup, and color control options. The vectoriser must intelligently extract detail from images — including subtle gradients, edges, and curves — and be capable of producing vector outputs that support up to 100 colours while maintaining fidelity to the original artwork. Key Features and Functional Requirements Input Support Allow uploading of raster files: .jpeg, .jpg, .png, .pdf, .tiff, .webp, .bmp Max file size: 100 MB Auto-convert to consistent internal format for preprocessing Vectorisation Engine Automatically detect edges, curves, regions, and gradients Use advanced image segmentation and curve-fitting (e.g., Potrace + Bézier refinement, or OpenCV contour detection + RDP algorithm) Vectorize with: Up to 100 colors per image (user-adjustable via slider or dropdown) Option for black & white, 2-colour, 8-colour, 16-colour, 32-colour, and 100-colour outputs Optional toggles: preserve transparency, smooth edges, corner snapping, flatten layers Preview and Comparison Interface Display side-by-side live comparison: original vs vectorised version Allow toggling between side-by-side and overlay comparison (slider split view) Include zoom, pan, and pixel-level inspection Live colour palette preview of detected colours Toggle each colour's visibility, and optionally merge or delete colours manually Manual Editing Tools (Optional Advanced Tab) Path simplification, pen editing, anchor-point adjustment Allow removing or redrawing vector shapes manually Add missing lines or shapes Colour fill picker and replacement tool Export Options Download vector output in the following formats: .svg .eps .pdf (vector format) .png (rasterised preview) .jpeg Allow selecting export resolution and DPI (for PNG/JPEG) Include embedded colour profiles if available Include optional metadata: image name, time vectorised, author, app name Frontend Interface (Web UI) Built using a modern framework (React, Vue, or Svelte) File drag-and-drop area with progress bar Responsive layout for desktop/tablet Color selection via palette sidebar Tabbed interface for: Upload Vector Settings Preview & Compare Manual Edit (optional) Export Backend / Engine Technologies Written in Python (e.g., Flask or FastAPI) or Node.js Use libraries like: OpenCV for image preprocessing and segmentation vectorizer or Potrace for path generation Custom SVG rendering layer using svgwrite, cairo, or native JS renderers Must support batch processing for queue-based operations Performance and Fidelity Requirements Vectorisation should complete within 5–15 seconds for typical images under 2000x2000px Must retain as much detail as possible, including smooth transitions between curved regions Path complexity reduction without degrading output significantly Colour fidelity must approximate 90%+ visual match from raster to vector Optional Advanced Features (if scope allows) AI-enhanced edge prediction for low-quality or noisy images Export as layered vector (e.g., layered SVG groups for each colour region) History and Undo Stack in Manual Edit Mode Auto-background removal or alpha masking Batch upload and bulk export with ZIP packaging