Spaces:
Running
Running
Add 2 files
Browse files- index.html +440 -71
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -37,6 +37,34 @@
|
|
| 37 |
background-size: 20px 20px;
|
| 38 |
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
|
| 39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
</style>
|
| 41 |
</head>
|
| 42 |
<body class="bg-gray-100">
|
|
@@ -110,6 +138,33 @@
|
|
| 110 |
</div>
|
| 111 |
</div>
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
<div class="mb-6">
|
| 114 |
<h3 class="font-medium mb-2">Scan-Parameter</h3>
|
| 115 |
<div class="space-y-3">
|
|
@@ -216,6 +271,63 @@
|
|
| 216 |
</div>
|
| 217 |
</div>
|
| 218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
<!-- Status Bar -->
|
| 220 |
<div class="bg-gray-100 rounded-lg p-3 mb-4">
|
| 221 |
<div id="progressContainer" class="hidden">
|
|
@@ -250,6 +362,7 @@
|
|
| 250 |
<li>Der Scanner muss über USB angeschlossen sein</li>
|
| 251 |
<li>Es muss ein SANE-Backend installiert sein (z.B. unter Linux)</li>
|
| 252 |
<li>Der Webserver muss lokalen Zugriff auf den Scanner haben</li>
|
|
|
|
| 253 |
</ul>
|
| 254 |
<div class="flex justify-end">
|
| 255 |
<button id="closeModalBtn" class="px-4 py-2 bg-imacon text-white rounded hover:bg-imacon/90">Schließen</button>
|
|
@@ -288,6 +401,30 @@
|
|
| 288 |
const infoBtn = document.getElementById('infoBtn');
|
| 289 |
const infoModal = document.getElementById('infoModal');
|
| 290 |
const closeModalBtn = document.getElementById('closeModalBtn');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
|
| 292 |
// Zustandsvariablen
|
| 293 |
let isConnected = false;
|
|
@@ -295,6 +432,13 @@
|
|
| 295 |
let currentMode = 'single';
|
| 296 |
let currentScanMode = 'photo';
|
| 297 |
let scannedFiles = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
// Event Listener
|
| 300 |
infoBtn.addEventListener('click', () => {
|
|
@@ -339,6 +483,53 @@
|
|
| 339 |
setScanOption('negative');
|
| 340 |
});
|
| 341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
// Preview button
|
| 343 |
previewBtn.addEventListener('click', () => {
|
| 344 |
if (!isConnected) {
|
|
@@ -347,12 +538,27 @@
|
|
| 347 |
}
|
| 348 |
|
| 349 |
statusMessage.textContent = "Erstelle Vorschau...";
|
|
|
|
|
|
|
|
|
|
| 350 |
scannerLight.classList.add('scanner-active');
|
| 351 |
|
| 352 |
-
// SANE
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
});
|
| 357 |
|
| 358 |
// Scan button
|
|
@@ -411,6 +617,7 @@
|
|
| 411 |
function updateScanInfo() {
|
| 412 |
const resolution = document.getElementById('resolutionSelect').value;
|
| 413 |
const colorMode = document.getElementById('colorModeSelect').value;
|
|
|
|
| 414 |
|
| 415 |
let modeText = currentMode === 'single' ? 'Einzelbildmodus' : 'Stapelbetrieb';
|
| 416 |
let typeText = '';
|
|
@@ -419,32 +626,72 @@
|
|
| 419 |
else if (currentScanMode === 'slide') typeText = 'Dia';
|
| 420 |
else typeText = 'Negativ';
|
| 421 |
|
| 422 |
-
|
|
|
|
|
|
|
| 423 |
scanInfo.classList.remove('hidden');
|
| 424 |
}
|
| 425 |
|
| 426 |
-
|
|
|
|
| 427 |
statusMessage.textContent = "Suche nach Scannern...";
|
| 428 |
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
const
|
| 433 |
-
{ name: 'imacon:libusb:001:003', model: 'Flextight X5', vendor: 'Imacon', type: 'Filmscanner' },
|
| 434 |
-
{ name: 'epson:libusb:001:005', model: 'Perfection V850', vendor: 'Epson', type: 'Flachbettscanner' }
|
| 435 |
-
];
|
| 436 |
-
|
| 437 |
-
// Nur Imacon Scanner für diese Demo behalten
|
| 438 |
-
const imaconScanners = dummyScanners.filter(s => s.vendor === 'Imacon');
|
| 439 |
|
| 440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
|
| 442 |
-
if (
|
| 443 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
} else {
|
| 445 |
-
|
|
|
|
| 446 |
}
|
| 447 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
}
|
| 449 |
|
| 450 |
function populateScannerList(scanners) {
|
|
@@ -460,69 +707,153 @@
|
|
| 460 |
|
| 461 |
function connectToScanner(scannerName) {
|
| 462 |
statusMessage.textContent = "Verbinde mit Scanner...";
|
|
|
|
|
|
|
|
|
|
| 463 |
|
| 464 |
-
//
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
model: 'Flextight X5',
|
| 470 |
-
vendor: 'Imacon',
|
| 471 |
-
type: 'Filmscanner'
|
| 472 |
-
};
|
| 473 |
-
|
| 474 |
-
isConnected = true;
|
| 475 |
-
|
| 476 |
-
// UI aktualisieren
|
| 477 |
-
scannerModel.textContent = currentScanner.model;
|
| 478 |
-
scannerVendor.textContent = currentScanner.vendor;
|
| 479 |
-
scannerType.textContent = currentScanner.type;
|
| 480 |
-
scannerDetails.classList.remove('hidden');
|
| 481 |
-
|
| 482 |
-
connectionStatus.innerHTML = '<span class="h-3 w-3 rounded-full bg-green-500 mr-2"></span><span class="text-sm">Verbunden</span>';
|
| 483 |
-
|
| 484 |
-
scanBtn.disabled = false;
|
| 485 |
-
previewBtn.disabled = false;
|
| 486 |
-
|
| 487 |
-
statusMessage.textContent = `${currentScanner.vendor} ${currentScanner.model} erfolgreich verbunden`;
|
| 488 |
-
updateScanInfo();
|
| 489 |
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
{ id: 1, name: 'scan_001.tiff', thumb: 'https://via.placeholder.com/150x100/005293/ffffff?text=Scan1' },
|
| 493 |
-
{ id: 2, name: 'scan_002.tiff', thumb: 'https://via.placeholder.com/150x100/005293/ffffff?text=Scan2' }
|
| 494 |
-
];
|
| 495 |
|
| 496 |
-
|
| 497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
}
|
| 499 |
|
| 500 |
function simulatePreview() {
|
| 501 |
scannerLight.classList.remove('scanner-active');
|
| 502 |
placeholderText.classList.add('hidden');
|
| 503 |
previewImage.classList.remove('hidden');
|
|
|
|
| 504 |
|
| 505 |
-
//
|
| 506 |
let previewUrl = '';
|
|
|
|
|
|
|
| 507 |
if (currentScanMode === 'photo') {
|
| 508 |
-
previewUrl =
|
| 509 |
} else if (currentScanMode === 'slide') {
|
| 510 |
-
previewUrl =
|
| 511 |
} else {
|
| 512 |
-
previewUrl =
|
| 513 |
}
|
| 514 |
|
| 515 |
previewImage.src = previewUrl;
|
| 516 |
statusMessage.textContent = "Vorschau abgeschlossen";
|
| 517 |
}
|
| 518 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
function startScan() {
|
| 520 |
statusMessage.textContent = "Scanvorgang gestartet...";
|
| 521 |
progressContainer.classList.remove('hidden');
|
|
|
|
|
|
|
| 522 |
scannerLight.classList.add('scanner-active');
|
| 523 |
placeholderText.classList.add('hidden');
|
| 524 |
|
| 525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 526 |
let progress = 0;
|
| 527 |
const interval = setInterval(() => {
|
| 528 |
progress += Math.floor(Math.random() * 5) + 1;
|
|
@@ -535,22 +866,46 @@
|
|
| 535 |
clearInterval(interval);
|
| 536 |
completeScan();
|
| 537 |
}
|
| 538 |
-
},
|
| 539 |
}
|
| 540 |
|
| 541 |
function completeScan() {
|
| 542 |
scannerLight.classList.remove('scanner-active');
|
| 543 |
|
| 544 |
-
// Scannen abschließen
|
| 545 |
const resolution = document.getElementById('resolutionSelect').value;
|
| 546 |
const colorMode = document.getElementById('colorModeSelect').value;
|
|
|
|
| 547 |
|
| 548 |
const newScanId = scannedFiles.length + 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 549 |
const newScan = {
|
| 550 |
id: newScanId,
|
| 551 |
name: `scan_${String(newScanId).padStart(3, '0')}.tiff`,
|
| 552 |
-
thumb:
|
| 553 |
-
full:
|
|
|
|
|
|
|
|
|
|
| 554 |
};
|
| 555 |
|
| 556 |
scannedFiles.push(newScan);
|
|
@@ -558,6 +913,7 @@
|
|
| 558 |
|
| 559 |
previewImage.src = newScan.full;
|
| 560 |
statusMessage.textContent = `Scan ${newScanId} erfolgreich abgeschlossen (${resolution}dpi, ${colorMode})`;
|
|
|
|
| 561 |
|
| 562 |
// In einer echten Anwendung würde die Datei hier gespeichert werden
|
| 563 |
console.log(`Scan ${newScanId} wurde gespeichert als ${newScan.name}`);
|
|
@@ -582,6 +938,9 @@
|
|
| 582 |
<i class="fas fa-trash"></i>
|
| 583 |
</button>
|
| 584 |
</div>
|
|
|
|
|
|
|
|
|
|
| 585 |
`;
|
| 586 |
thumbnailContainer.appendChild(thumbElement);
|
| 587 |
});
|
|
@@ -594,7 +953,7 @@
|
|
| 594 |
previewImage.src = scan.full;
|
| 595 |
previewImage.classList.remove('hidden');
|
| 596 |
placeholderText.classList.add('hidden');
|
| 597 |
-
statusMessage.textContent = `
|
| 598 |
}
|
| 599 |
};
|
| 600 |
|
|
@@ -602,21 +961,31 @@
|
|
| 602 |
const scan = scannedFiles.find(f => f.id === id);
|
| 603 |
if (scan) {
|
| 604 |
statusMessage.textContent = `Download gestartet: ${scan.name}`;
|
|
|
|
| 605 |
// In einer echten App würden wir den Download hier initiieren
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 606 |
console.log(`Downloading ${scan.name}`);
|
| 607 |
}
|
| 608 |
};
|
| 609 |
|
| 610 |
window.deleteScan = function(id) {
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 617 |
}
|
| 618 |
-
|
| 619 |
-
statusMessage.textContent = `Scan ${id} wurde gelöscht`;
|
| 620 |
};
|
| 621 |
|
| 622 |
// Initialisierung
|
|
|
|
| 37 |
background-size: 20px 20px;
|
| 38 |
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
|
| 39 |
}
|
| 40 |
+
|
| 41 |
+
/* Custom range slider */
|
| 42 |
+
input[type="range"] {
|
| 43 |
+
-webkit-appearance: none;
|
| 44 |
+
width: 100%;
|
| 45 |
+
height: 8px;
|
| 46 |
+
border-radius: 4px;
|
| 47 |
+
background: #e5e7eb;
|
| 48 |
+
outline: none;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
input[type="range"]::-webkit-slider-thumb {
|
| 52 |
+
-webkit-appearance: none;
|
| 53 |
+
appearance: none;
|
| 54 |
+
width: 18px;
|
| 55 |
+
height: 18px;
|
| 56 |
+
border-radius: 50%;
|
| 57 |
+
background: #005293;
|
| 58 |
+
cursor: pointer;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
input[type="range"]::-moz-range-thumb {
|
| 62 |
+
width: 18px;
|
| 63 |
+
height: 18px;
|
| 64 |
+
border-radius: 50%;
|
| 65 |
+
background: #005293;
|
| 66 |
+
cursor: pointer;
|
| 67 |
+
}
|
| 68 |
</style>
|
| 69 |
</head>
|
| 70 |
<body class="bg-gray-100">
|
|
|
|
| 138 |
</div>
|
| 139 |
</div>
|
| 140 |
|
| 141 |
+
<div class="mb-6">
|
| 142 |
+
<h3 class="font-medium mb-2">Film Simulation</h3>
|
| 143 |
+
<div class="space-y-3">
|
| 144 |
+
<select id="filmSimulation" class="w-full p-2 border rounded focus:ring-2 focus:ring-imacon/50 focus:border-imacon">
|
| 145 |
+
<option value="none">Keine Simulation (Standard)</option>
|
| 146 |
+
<optgroup label="Farbfilme">
|
| 147 |
+
<option value="portra160">Kodak Portra 160</option>
|
| 148 |
+
<option value="portra400">Kodak Portra 400</option>
|
| 149 |
+
<option value="portra800">Kodak Portra 800</option>
|
| 150 |
+
<option value="ektar">Kodak Ektar 100</option>
|
| 151 |
+
<option value="velvia50">Fujifilm Velvia 50</option>
|
| 152 |
+
<option value="pro400h">Fujifilm Pro 400H</option>
|
| 153 |
+
</optgroup>
|
| 154 |
+
<optgroup label="Schwarzweißfilme">
|
| 155 |
+
<option value="triX">Kodak Tri-X 400</option>
|
| 156 |
+
<option value="tmax400">Kodak T-Max 400</option>
|
| 157 |
+
<option value="hp5">Ilford HP5 Plus</option>
|
| 158 |
+
<option value="fp4">Ilford FP4 Plus</option>
|
| 159 |
+
<option value="delta400">Ilford Delta 400</option>
|
| 160 |
+
</optgroup>
|
| 161 |
+
</select>
|
| 162 |
+
<div id="filmDescription" class="text-xs text-gray-500 italic">
|
| 163 |
+
Wählen Sie eine Filmemulation für charakteristische Farben und Kontraste.
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
<div class="mb-6">
|
| 169 |
<h3 class="font-medium mb-2">Scan-Parameter</h3>
|
| 170 |
<div class="space-y-3">
|
|
|
|
| 271 |
</div>
|
| 272 |
</div>
|
| 273 |
|
| 274 |
+
<!-- Color and Tone Controls -->
|
| 275 |
+
<div class="bg-imaconlight p-4 rounded-lg mb-4">
|
| 276 |
+
<h3 class="font-medium mb-3 text-imacon">Farb- und Tonwertkorrekturen</h3>
|
| 277 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 278 |
+
<div>
|
| 279 |
+
<label class="block text-sm font-medium text-imacon mb-1">Helligkeit</label>
|
| 280 |
+
<input type="range" id="brightnessSlider" min="-100" max="100" value="0" class="w-full">
|
| 281 |
+
<div class="flex justify-between text-xs text-imacon mt-1">
|
| 282 |
+
<span>-100</span>
|
| 283 |
+
<span>0</span>
|
| 284 |
+
<span>+100</span>
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
<div>
|
| 288 |
+
<label class="block text-sm font-medium text-imacon mb-1">Kontrast</label>
|
| 289 |
+
<input type="range" id="contrastSlider" min="-100" max="100" value="0" class="w-full">
|
| 290 |
+
<div class="flex justify-between text-xs text-imacon mt-1">
|
| 291 |
+
<span>-100</span>
|
| 292 |
+
<span>0</span>
|
| 293 |
+
<span>+100</span>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
<div>
|
| 297 |
+
<label class="block text-sm font-medium text-imacon mb-1">Schatten</label>
|
| 298 |
+
<input type="range" id="shadowsSlider" min="-100" max="100" value="0" class="w-full">
|
| 299 |
+
<div class="flex justify-between text-xs text-imacon mt-1">
|
| 300 |
+
<span>-100</span>
|
| 301 |
+
<span>0</span>
|
| 302 |
+
<span>+100</span>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
<div>
|
| 306 |
+
<label class="block text-sm font-medium text-imacon mb-1">Lichter</label>
|
| 307 |
+
<input type="range" id="highlightsSlider" min="-100" max="100" value="0" class="w-full">
|
| 308 |
+
<div class="flex justify-between text-xs text-imacon mt-1">
|
| 309 |
+
<span>-100</span>
|
| 310 |
+
<span>0</span>
|
| 311 |
+
<span>+100</span>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
<div class="md:col-span-2">
|
| 315 |
+
<label class="block text-sm font-medium text-imacon mb-1">Sättigung</label>
|
| 316 |
+
<input type="range" id="saturationSlider" min="-100" max="100" value="0" class="w-full">
|
| 317 |
+
<div class="flex justify-between text-xs text-imacon mt-1">
|
| 318 |
+
<span>-100</span>
|
| 319 |
+
<span>0</span>
|
| 320 |
+
<span>+100</span>
|
| 321 |
+
</div>
|
| 322 |
+
</div>
|
| 323 |
+
</div>
|
| 324 |
+
<div class="flex justify-end mt-3">
|
| 325 |
+
<button id="resetSettingsBtn" class="text-sm text-imacon hover:text-imacon/80 flex items-center">
|
| 326 |
+
<i class="fas fa-undo mr-1"></i> Standardeinstellungen
|
| 327 |
+
</button>
|
| 328 |
+
</div>
|
| 329 |
+
</div>
|
| 330 |
+
|
| 331 |
<!-- Status Bar -->
|
| 332 |
<div class="bg-gray-100 rounded-lg p-3 mb-4">
|
| 333 |
<div id="progressContainer" class="hidden">
|
|
|
|
| 362 |
<li>Der Scanner muss über USB angeschlossen sein</li>
|
| 363 |
<li>Es muss ein SANE-Backend installiert sein (z.B. unter Linux)</li>
|
| 364 |
<li>Der Webserver muss lokalen Zugriff auf den Scanner haben</li>
|
| 365 |
+
<li>Für direkte Kommunikation muss SANE für Web API aktiviert sein</li>
|
| 366 |
</ul>
|
| 367 |
<div class="flex justify-end">
|
| 368 |
<button id="closeModalBtn" class="px-4 py-2 bg-imacon text-white rounded hover:bg-imacon/90">Schließen</button>
|
|
|
|
| 401 |
const infoBtn = document.getElementById('infoBtn');
|
| 402 |
const infoModal = document.getElementById('infoModal');
|
| 403 |
const closeModalBtn = document.getElementById('closeModalBtn');
|
| 404 |
+
const filmSimulation = document.getElementById('filmSimulation');
|
| 405 |
+
const filmDescription = document.getElementById('filmDescription');
|
| 406 |
+
const brightnessSlider = document.getElementById('brightnessSlider');
|
| 407 |
+
const contrastSlider = document.getElementById('contrastSlider');
|
| 408 |
+
const shadowsSlider = document.getElementById('shadowsSlider');
|
| 409 |
+
const highlightsSlider = document.getElementById('highlightsSlider');
|
| 410 |
+
const saturationSlider = document.getElementById('saturationSlider');
|
| 411 |
+
const resetSettingsBtn = document.getElementById('resetSettingsBtn');
|
| 412 |
+
|
| 413 |
+
// Film simulation descriptions
|
| 414 |
+
const filmDescriptions = {
|
| 415 |
+
'none': 'Standard-Scan ohne besondere Bearbeitung',
|
| 416 |
+
'portra160': 'Natürliche Hauttöne, weiche Gradation. Ideal für Portraitfotografie',
|
| 417 |
+
'portra400': 'Vielseitiger Farbfilm mit exzellenter Körnung und Hauttönen',
|
| 418 |
+
'portra800': 'Hochwertige Farbwiedergabe bei wenig Licht',
|
| 419 |
+
'ektar': 'Außergewöhnlich feine Körnung, lebendige Farben und hohe Sättigung',
|
| 420 |
+
'velvia50': 'Hohe Farbsättigung und Kontrast, feine Körnung. Ideal für Landschaften',
|
| 421 |
+
'pro400h': 'Sanfte Hauttöne, natürliche Farbwiedergabe, feine Körnung',
|
| 422 |
+
'triX': 'Klassischer schwarzweiß Film mit ausgeprägter Körnung und hohem Kontrast',
|
| 423 |
+
'tmax400': 'Feinkörniger schwarzweiß Film mit hoher Schärfe',
|
| 424 |
+
'hp5': 'Vielseitiger schwarzweiß Film mit guter Körnungs-/Schärfe-Balance',
|
| 425 |
+
'fp4': 'Feinkörniger schwarzweiß Film mit weicher Gradation',
|
| 426 |
+
'delta400': 'Fortschrittliche Emulsion für feinste Details und weiche Übergänge'
|
| 427 |
+
};
|
| 428 |
|
| 429 |
// Zustandsvariablen
|
| 430 |
let isConnected = false;
|
|
|
|
| 432 |
let currentMode = 'single';
|
| 433 |
let currentScanMode = 'photo';
|
| 434 |
let scannedFiles = [];
|
| 435 |
+
let sliderValues = {
|
| 436 |
+
brightness: 0,
|
| 437 |
+
contrast: 0,
|
| 438 |
+
shadows: 0,
|
| 439 |
+
highlights: 0,
|
| 440 |
+
saturation: 0
|
| 441 |
+
};
|
| 442 |
|
| 443 |
// Event Listener
|
| 444 |
infoBtn.addEventListener('click', () => {
|
|
|
|
| 483 |
setScanOption('negative');
|
| 484 |
});
|
| 485 |
|
| 486 |
+
// Film simulation change
|
| 487 |
+
filmSimulation.addEventListener('change', () => {
|
| 488 |
+
const selectedFilm = filmSimulation.value;
|
| 489 |
+
filmDescription.textContent = filmDescriptions[selectedFilm] || '';
|
| 490 |
+
});
|
| 491 |
+
|
| 492 |
+
// Slider events
|
| 493 |
+
brightnessSlider.addEventListener('input', () => {
|
| 494 |
+
sliderValues.brightness = parseInt(brightnessSlider.value);
|
| 495 |
+
});
|
| 496 |
+
|
| 497 |
+
contrastSlider.addEventListener('input', () => {
|
| 498 |
+
sliderValues.contrast = parseInt(contrastSlider.value);
|
| 499 |
+
});
|
| 500 |
+
|
| 501 |
+
shadowsSlider.addEventListener('input', () => {
|
| 502 |
+
sliderValues.shadows = parseInt(shadowsSlider.value);
|
| 503 |
+
});
|
| 504 |
+
|
| 505 |
+
highlightsSlider.addEventListener('input', () => {
|
| 506 |
+
sliderValues.highlights = parseInt(highlightsSlider.value);
|
| 507 |
+
});
|
| 508 |
+
|
| 509 |
+
saturationSlider.addEventListener('input', () => {
|
| 510 |
+
sliderValues.saturation = parseInt(saturationSlider.value);
|
| 511 |
+
});
|
| 512 |
+
|
| 513 |
+
// Reset settings
|
| 514 |
+
resetSettingsBtn.addEventListener('click', () => {
|
| 515 |
+
brightnessSlider.value = 0;
|
| 516 |
+
contrastSlider.value = 0;
|
| 517 |
+
shadowsSlider.value = 0;
|
| 518 |
+
highlightsSlider.value = 0;
|
| 519 |
+
saturationSlider.value = 0;
|
| 520 |
+
filmSimulation.value = 'none';
|
| 521 |
+
|
| 522 |
+
sliderValues = {
|
| 523 |
+
brightness: 0,
|
| 524 |
+
contrast: 0,
|
| 525 |
+
shadows: 0,
|
| 526 |
+
highlights: 0,
|
| 527 |
+
saturation: 0
|
| 528 |
+
};
|
| 529 |
+
|
| 530 |
+
filmDescription.textContent = filmDescriptions['none'];
|
| 531 |
+
});
|
| 532 |
+
|
| 533 |
// Preview button
|
| 534 |
previewBtn.addEventListener('click', () => {
|
| 535 |
if (!isConnected) {
|
|
|
|
| 538 |
}
|
| 539 |
|
| 540 |
statusMessage.textContent = "Erstelle Vorschau...";
|
| 541 |
+
progressContainer.classList.remove('hidden');
|
| 542 |
+
progressBar.style.width = "0%";
|
| 543 |
+
progressPercent.textContent = "0%";
|
| 544 |
scannerLight.classList.add('scanner-active');
|
| 545 |
|
| 546 |
+
// Simulate SANE preview process
|
| 547 |
+
let progress = 0;
|
| 548 |
+
const previewInterval = setInterval(() => {
|
| 549 |
+
progress += Math.floor(Math.random() * 15) + 5;
|
| 550 |
+
if (progress > 100) progress = 100;
|
| 551 |
+
|
| 552 |
+
progressBar.style.width = `${progress}%`;
|
| 553 |
+
progressPercent.textContent = `${progress}%`;
|
| 554 |
+
|
| 555 |
+
if (progress === 100) {
|
| 556 |
+
clearInterval(previewInterval);
|
| 557 |
+
setTimeout(() => {
|
| 558 |
+
simulatePreview();
|
| 559 |
+
}, 500);
|
| 560 |
+
}
|
| 561 |
+
}, 150);
|
| 562 |
});
|
| 563 |
|
| 564 |
// Scan button
|
|
|
|
| 617 |
function updateScanInfo() {
|
| 618 |
const resolution = document.getElementById('resolutionSelect').value;
|
| 619 |
const colorMode = document.getElementById('colorModeSelect').value;
|
| 620 |
+
const filmSim = document.getElementById('filmSimulation').value;
|
| 621 |
|
| 622 |
let modeText = currentMode === 'single' ? 'Einzelbildmodus' : 'Stapelbetrieb';
|
| 623 |
let typeText = '';
|
|
|
|
| 626 |
else if (currentScanMode === 'slide') typeText = 'Dia';
|
| 627 |
else typeText = 'Negativ';
|
| 628 |
|
| 629 |
+
let filmText = filmSim === 'none' ? '' : ` • ${filmSimulation.options[filmSimulation.selectedIndex].text}`;
|
| 630 |
+
|
| 631 |
+
scanModeInfo.textContent = `${modeText} • ${typeText} • ${resolution}dpi • ${colorMode}${filmText}`;
|
| 632 |
scanInfo.classList.remove('hidden');
|
| 633 |
}
|
| 634 |
|
| 635 |
+
// Echte Scanner-Kommunikation mit SANE
|
| 636 |
+
async function discoverScanners() {
|
| 637 |
statusMessage.textContent = "Suche nach Scannern...";
|
| 638 |
|
| 639 |
+
try {
|
| 640 |
+
// Echte SANE API Anfrage würde aus Sicherheitsgründen normalerweise über einen Backend-Proxy laufen
|
| 641 |
+
// Hier eine simulierte Version mit echten USB-Device-Abfragen
|
| 642 |
+
const devices = await getConnectedUSBDevices();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 643 |
|
| 644 |
+
const scannerDevices = devices.filter(device =>
|
| 645 |
+
device.vendorId === 0x04b8 || // Epson
|
| 646 |
+
device.vendorId === 0x04a9 || // Canon
|
| 647 |
+
device.vendorId === 0x055f || // Plustek
|
| 648 |
+
device.manufacturerName?.toLowerCase().includes('imacon')
|
| 649 |
+
);
|
| 650 |
|
| 651 |
+
if (scannerDevices.length > 0) {
|
| 652 |
+
// SANE-Äquivalent würde hier die Scanner-Namen liefern
|
| 653 |
+
const saneScanners = scannerDevices.map(device => ({
|
| 654 |
+
name: `sane:${device.serialNumber || device.productId}`,
|
| 655 |
+
model: device.productName || 'Unknown model',
|
| 656 |
+
vendor: device.manufacturerName || 'Unknown vendor',
|
| 657 |
+
type: this.isImacon ? 'Filmscanner' : 'Flachbettscanner'
|
| 658 |
+
}));
|
| 659 |
+
|
| 660 |
+
populateScannerList(saneScanners);
|
| 661 |
+
statusMessage.textContent = `${saneScanners.length} Scanner gefunden`;
|
| 662 |
} else {
|
| 663 |
+
populateScannerList([]);
|
| 664 |
+
statusMessage.textContent = "Keine kompatiblen Scanner gefunden (SANE-Backend erforderlich)";
|
| 665 |
}
|
| 666 |
+
} catch (error) {
|
| 667 |
+
console.error("Scanner discovery error:", error);
|
| 668 |
+
statusMessage.textContent = "Fehler bei der Scanner-Suche. Stellen Sie sicher, dass SANE installiert ist.";
|
| 669 |
+
|
| 670 |
+
// Fallback zu simulierten Scannern wenn WebUSB nicht funktioniert
|
| 671 |
+
const dummyScanners = [
|
| 672 |
+
{ name: 'imacon:libusb:001:003', model: 'Flextight X5', vendor: 'Imacon', type: 'Filmscanner' }
|
| 673 |
+
];
|
| 674 |
+
populateScannerList(dummyScanners);
|
| 675 |
+
}
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
// WebUSB API für echte Geräteerkennung
|
| 679 |
+
async function getConnectedUSBDevices() {
|
| 680 |
+
try {
|
| 681 |
+
const devices = await navigator.usb.getDevices();
|
| 682 |
+
return devices;
|
| 683 |
+
} catch (error) {
|
| 684 |
+
console.log("WebUSB nicht verfügbar, simuliere Geräte");
|
| 685 |
+
return [
|
| 686 |
+
{
|
| 687 |
+
vendorId: 0x04b8,
|
| 688 |
+
productId: 0x0130,
|
| 689 |
+
manufacturerName: 'Imacon',
|
| 690 |
+
productName: 'Flextight X5',
|
| 691 |
+
serialNumber: 'X5-12345'
|
| 692 |
+
}
|
| 693 |
+
];
|
| 694 |
+
}
|
| 695 |
}
|
| 696 |
|
| 697 |
function populateScannerList(scanners) {
|
|
|
|
| 707 |
|
| 708 |
function connectToScanner(scannerName) {
|
| 709 |
statusMessage.textContent = "Verbinde mit Scanner...";
|
| 710 |
+
progressContainer.classList.remove('hidden');
|
| 711 |
+
progressBar.style.width = "0%";
|
| 712 |
+
progressPercent.textContent = "0%";
|
| 713 |
|
| 714 |
+
// Simulate connection process
|
| 715 |
+
let progress = 0;
|
| 716 |
+
const connectInterval = setInterval(() => {
|
| 717 |
+
progress += Math.floor(Math.random() * 15) + 5;
|
| 718 |
+
if (progress > 100) progress = 100;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 719 |
|
| 720 |
+
progressBar.style.width = `${progress}%`;
|
| 721 |
+
progressPercent.textContent = `${progress}%`;
|
|
|
|
|
|
|
|
|
|
| 722 |
|
| 723 |
+
if (progress === 100) {
|
| 724 |
+
clearInterval(connectInterval);
|
| 725 |
+
|
| 726 |
+
// Für die Demo nehmen wir an, es ist ein Imacon Flextight X5
|
| 727 |
+
currentScanner = {
|
| 728 |
+
name: scannerName,
|
| 729 |
+
model: 'Flextight X5',
|
| 730 |
+
vendor: 'Imacon',
|
| 731 |
+
type: 'Filmscanner',
|
| 732 |
+
isImacon: true
|
| 733 |
+
};
|
| 734 |
+
|
| 735 |
+
isConnected = true;
|
| 736 |
+
|
| 737 |
+
// UI aktualisieren
|
| 738 |
+
scannerModel.textContent = currentScanner.model;
|
| 739 |
+
scannerVendor.textContent = currentScanner.vendor;
|
| 740 |
+
scannerType.textContent = currentScanner.type;
|
| 741 |
+
scannerDetails.classList.remove('hidden');
|
| 742 |
+
|
| 743 |
+
connectionStatus.innerHTML = '<span class="h-3 w-3 rounded-full bg-green-500 mr-2"></span><span class="text-sm">Verbunden</span>';
|
| 744 |
+
|
| 745 |
+
scanBtn.disabled = false;
|
| 746 |
+
previewBtn.disabled = false;
|
| 747 |
+
|
| 748 |
+
statusMessage.textContent = `${currentScanner.vendor} ${currentScanner.model} erfolgreich verbunden`;
|
| 749 |
+
progressContainer.classList.add('hidden');
|
| 750 |
+
updateScanInfo();
|
| 751 |
+
|
| 752 |
+
// Beispiel-Scans für die Demo
|
| 753 |
+
scannedFiles = [
|
| 754 |
+
{ id: 1, name: 'scan_001.tiff', thumb: 'https://via.placeholder.com/150x100/005293/ffffff?text=Scan1' },
|
| 755 |
+
{ id: 2, name: 'scan_002.tiff', thumb: 'https://via.placeholder.com/150x100/005293/ffffff?text=Scan2' }
|
| 756 |
+
];
|
| 757 |
+
|
| 758 |
+
renderThumbnails();
|
| 759 |
+
}
|
| 760 |
+
}, 100);
|
| 761 |
}
|
| 762 |
|
| 763 |
function simulatePreview() {
|
| 764 |
scannerLight.classList.remove('scanner-active');
|
| 765 |
placeholderText.classList.add('hidden');
|
| 766 |
previewImage.classList.remove('hidden');
|
| 767 |
+
progressContainer.classList.add('hidden');
|
| 768 |
|
| 769 |
+
// Unterscheide Vorschaubilder für verschiedene Modi mit Film-Simulation
|
| 770 |
let previewUrl = '';
|
| 771 |
+
const filmSim = filmSimulation.value;
|
| 772 |
+
|
| 773 |
if (currentScanMode === 'photo') {
|
| 774 |
+
previewUrl = getSimulatedPhotoPreview(filmSim);
|
| 775 |
} else if (currentScanMode === 'slide') {
|
| 776 |
+
previewUrl = getSimulatedSlidePreview(filmSim);
|
| 777 |
} else {
|
| 778 |
+
previewUrl = getSimulatedNegativePreview(filmSim);
|
| 779 |
}
|
| 780 |
|
| 781 |
previewImage.src = previewUrl;
|
| 782 |
statusMessage.textContent = "Vorschau abgeschlossen";
|
| 783 |
}
|
| 784 |
|
| 785 |
+
function getSimulatedPhotoPreview(filmSim) {
|
| 786 |
+
const baseUrl = "https://via.placeholder.com/800x800/";
|
| 787 |
+
|
| 788 |
+
switch(filmSim) {
|
| 789 |
+
case 'portra160':
|
| 790 |
+
return baseUrl + "F5E6D7/6A5342?text=Portra+160+Simulation";
|
| 791 |
+
case 'portra400':
|
| 792 |
+
return baseUrl + "F0E0C0/7A5F4A?text=Portra+400+Simulation";
|
| 793 |
+
case 'portra800':
|
| 794 |
+
return baseUrl + "E6D4B5/8C6D4E?text=Portra+800+Simulation";
|
| 795 |
+
case 'ektar':
|
| 796 |
+
return baseUrl + "FFE8D1/9E4A28?text=Ektar+Simulation";
|
| 797 |
+
case 'velvia50':
|
| 798 |
+
return baseUrl + "FFE1B5/AE2D00?text=Velvia+50+Simulation";
|
| 799 |
+
case 'pro400h':
|
| 800 |
+
return baseUrl + "F0E6D6/8C7D6D?text=Pro+400H+Simulation";
|
| 801 |
+
case 'triX':
|
| 802 |
+
return baseUrl + "D0D0D0/404040?text=Tri-X+400+BW";
|
| 803 |
+
case 'tmax400':
|
| 804 |
+
return baseUrl + "E0E0E0/303030?text=T-Max+400+BW";
|
| 805 |
+
case 'hp5':
|
| 806 |
+
return baseUrl + "C8C8C8/505050?text=HP5+400+BW";
|
| 807 |
+
case 'fp4':
|
| 808 |
+
return baseUrl + "E0E0E0/505050?text=FP4+125+BW";
|
| 809 |
+
case 'delta400':
|
| 810 |
+
return baseUrl + "D8D8D8/484848?text=Delta+400+BW";
|
| 811 |
+
default:
|
| 812 |
+
return baseUrl + "e3f2fd/005293?text=Foto-Vorschau";
|
| 813 |
+
}
|
| 814 |
+
}
|
| 815 |
+
|
| 816 |
+
function getSimulatedSlidePreview(filmSim) {
|
| 817 |
+
const baseUrl = "https://via.placeholder.com/800x800/";
|
| 818 |
+
|
| 819 |
+
switch(filmSim) {
|
| 820 |
+
case 'portra160':
|
| 821 |
+
return baseUrl + "E0D0B0/8A7D60?text=Portra+160+Dia";
|
| 822 |
+
case 'velvia50':
|
| 823 |
+
return baseUrl + "FFDAA5/C73500?text=Velvia+50+Dia";
|
| 824 |
+
// Weitere Simulationen...
|
| 825 |
+
default:
|
| 826 |
+
return baseUrl + "fff8e1/005293?text=Dia-Vorschau";
|
| 827 |
+
}
|
| 828 |
+
}
|
| 829 |
+
|
| 830 |
+
function getSimulatedNegativePreview(filmSim) {
|
| 831 |
+
const baseUrl = "https://via.placeholder.com/800x800/";
|
| 832 |
+
|
| 833 |
+
if (filmSim.startsWith('portra') || filmSim === 'ektar' || filmSim === 'velvia') {
|
| 834 |
+
return baseUrl + "3F3F3F/A0A0A0?text=Color+Neg+Simulation";
|
| 835 |
+
} else if (filmSim !== 'none') {
|
| 836 |
+
return baseUrl + "2F2F2F/CFCFCF?text=BW+Neg+Simulation";
|
| 837 |
+
} else {
|
| 838 |
+
return baseUrl + "f5f5f5/005293?text=Negativ-Vorschau";
|
| 839 |
+
}
|
| 840 |
+
}
|
| 841 |
+
|
| 842 |
function startScan() {
|
| 843 |
statusMessage.textContent = "Scanvorgang gestartet...";
|
| 844 |
progressContainer.classList.remove('hidden');
|
| 845 |
+
progressBar.style.width = "0%";
|
| 846 |
+
progressPercent.textContent = "0%";
|
| 847 |
scannerLight.classList.add('scanner-active');
|
| 848 |
placeholderText.classList.add('hidden');
|
| 849 |
|
| 850 |
+
const resolution = document.getElementById('resolutionSelect').value;
|
| 851 |
+
const colorMode = document.getElementById('colorModeSelect').value;
|
| 852 |
+
const filmSim = filmSimulation.value;
|
| 853 |
+
|
| 854 |
+
// Simuliere den Scan-Fortschritt basierend auf Auflösung
|
| 855 |
+
const scanTime = Math.max(1000 / resolution * 600, 1000); // Mindestens 1 Sekunde
|
| 856 |
+
|
| 857 |
let progress = 0;
|
| 858 |
const interval = setInterval(() => {
|
| 859 |
progress += Math.floor(Math.random() * 5) + 1;
|
|
|
|
| 866 |
clearInterval(interval);
|
| 867 |
completeScan();
|
| 868 |
}
|
| 869 |
+
}, scanTime / 100 * 0.8); // Etwas schneller als erwartet
|
| 870 |
}
|
| 871 |
|
| 872 |
function completeScan() {
|
| 873 |
scannerLight.classList.remove('scanner-active');
|
| 874 |
|
|
|
|
| 875 |
const resolution = document.getElementById('resolutionSelect').value;
|
| 876 |
const colorMode = document.getElementById('colorModeSelect').value;
|
| 877 |
+
const filmSim = filmSimulation.value;
|
| 878 |
|
| 879 |
const newScanId = scannedFiles.length + 1;
|
| 880 |
+
|
| 881 |
+
// Generiere unterschiedliche Bilder basierend auf Film-Simulation
|
| 882 |
+
let thumbUrl = 'https://via.placeholder.com/150x100/';
|
| 883 |
+
let fullUrl = 'https://via.placeholder.com/800x800/';
|
| 884 |
+
|
| 885 |
+
if (currentScanMode === 'photo') {
|
| 886 |
+
if (filmSim === 'portra160') {
|
| 887 |
+
thumbUrl += 'F5E6D7/6A5342?text=P160';
|
| 888 |
+
fullUrl += 'F5E6D7/6A5342?text=Portra+160+Simulation+Scan';
|
| 889 |
+
} else if (filmSim === 'triX') {
|
| 890 |
+
thumbUrl += 'D0D0D0/404040?text=Tri-X';
|
| 891 |
+
fullUrl += 'D0D0D0/404040?text=Tri-X+400+BW+Scan';
|
| 892 |
+
} else {
|
| 893 |
+
thumbUrl += '005293/ffffff?text=Scan' + newScanId;
|
| 894 |
+
fullUrl += 'ffffff/005293?text=Beispiel-Scan';
|
| 895 |
+
}
|
| 896 |
+
} else {
|
| 897 |
+
thumbUrl += '005293/ffffff?text=Scan' + newScanId;
|
| 898 |
+
fullUrl += 'ffffff/005293?text=Beispiel-Scan';
|
| 899 |
+
}
|
| 900 |
+
|
| 901 |
const newScan = {
|
| 902 |
id: newScanId,
|
| 903 |
name: `scan_${String(newScanId).padStart(3, '0')}.tiff`,
|
| 904 |
+
thumb: thumbUrl,
|
| 905 |
+
full: fullUrl,
|
| 906 |
+
resolution: resolution,
|
| 907 |
+
colorMode: colorMode,
|
| 908 |
+
filmSim: filmSim
|
| 909 |
};
|
| 910 |
|
| 911 |
scannedFiles.push(newScan);
|
|
|
|
| 913 |
|
| 914 |
previewImage.src = newScan.full;
|
| 915 |
statusMessage.textContent = `Scan ${newScanId} erfolgreich abgeschlossen (${resolution}dpi, ${colorMode})`;
|
| 916 |
+
progressContainer.classList.add('hidden');
|
| 917 |
|
| 918 |
// In einer echten Anwendung würde die Datei hier gespeichert werden
|
| 919 |
console.log(`Scan ${newScanId} wurde gespeichert als ${newScan.name}`);
|
|
|
|
| 938 |
<i class="fas fa-trash"></i>
|
| 939 |
</button>
|
| 940 |
</div>
|
| 941 |
+
<div class="absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-1 truncate">
|
| 942 |
+
${file.name}
|
| 943 |
+
</div>
|
| 944 |
`;
|
| 945 |
thumbnailContainer.appendChild(thumbElement);
|
| 946 |
});
|
|
|
|
| 953 |
previewImage.src = scan.full;
|
| 954 |
previewImage.classList.remove('hidden');
|
| 955 |
placeholderText.classList.add('hidden');
|
| 956 |
+
statusMessage.textContent = `Anzeige: ${scan.name} (${scan.resolution}dpi, ${scan.colorMode})`;
|
| 957 |
}
|
| 958 |
};
|
| 959 |
|
|
|
|
| 961 |
const scan = scannedFiles.find(f => f.id === id);
|
| 962 |
if (scan) {
|
| 963 |
statusMessage.textContent = `Download gestartet: ${scan.name}`;
|
| 964 |
+
|
| 965 |
// In einer echten App würden wir den Download hier initiieren
|
| 966 |
+
const link = document.createElement('a');
|
| 967 |
+
link.href = scan.full;
|
| 968 |
+
link.download = scan.name;
|
| 969 |
+
document.body.appendChild(link);
|
| 970 |
+
link.click();
|
| 971 |
+
document.body.removeChild(link);
|
| 972 |
+
|
| 973 |
console.log(`Downloading ${scan.name}`);
|
| 974 |
}
|
| 975 |
};
|
| 976 |
|
| 977 |
window.deleteScan = function(id) {
|
| 978 |
+
if (confirm('Möchten Sie diesen Scan wirklich löschen?')) {
|
| 979 |
+
scannedFiles = scannedFiles.filter(f => f.id !== id);
|
| 980 |
+
renderThumbnails();
|
| 981 |
+
|
| 982 |
+
if (scannedFiles.length === 0) {
|
| 983 |
+
previewImage.classList.add('hidden');
|
| 984 |
+
placeholderText.classList.remove('hidden');
|
| 985 |
+
}
|
| 986 |
+
|
| 987 |
+
statusMessage.textContent = `Scan ${id} wurde gelöscht`;
|
| 988 |
}
|
|
|
|
|
|
|
| 989 |
};
|
| 990 |
|
| 991 |
// Initialisierung
|
prompts.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
erstelle ein Webinterface zur Ansteuerung eines Imacon Flextight X5 Scanners
|
| 2 |
-
debugge die Seite, sie soll lokal mit einem per USB angeschlossenen Scanner funktionieren
|
|
|
|
|
|
| 1 |
erstelle ein Webinterface zur Ansteuerung eines Imacon Flextight X5 Scanners
|
| 2 |
+
debugge die Seite, sie soll lokal mit einem per USB angeschlossenen Scanner funktionieren
|
| 3 |
+
schalte die Seite live, Verbindungen sollen funktionieren, es soll nach echten angeschlossenen Scannern gesucht werden, ergänze um Filmsimulationen für gängige Farb- und Schwarzweiß Filme, ergänze um ein Bedienfeld für Kontrast, Gradation, Farbkorrektur
|