Spaces:
Running

WDFluho commited on
Commit
4faedf7
·
verified ·
1 Parent(s): 0e6ea9e

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +444 -412
  2. prompts.txt +3 -1
index.html CHANGED
@@ -14,7 +14,8 @@
14
  imacon: '#005293',
15
  imaconlight: '#e6f0f8',
16
  firewire: '#FF4500',
17
- thunderbolt: '#0071C5'
 
18
  }
19
  }
20
  }
@@ -87,6 +88,26 @@
87
  .film-option:hover {
88
  background-color: #f0f0f0;
89
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  </style>
91
  </head>
92
  <body class="bg-gray-100">
@@ -162,7 +183,7 @@
162
  <!-- Main Content -->
163
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
164
  <!-- Scanner Control Panel -->
165
- <div class="lg:col-span-1 bg-white rounded-lg shadow p-6">
166
  <h2 class="text-lg font-semibold text-gray-800 mb-4">Scanner-Steuerung</h2>
167
 
168
  <div class="space-y-4">
@@ -190,23 +211,31 @@
190
  <span class="text-gray-600">Typ:</span>
191
  <span id="scannerType" class="font-medium">-</span>
192
  </div>
 
 
 
 
 
 
 
 
193
  </div>
194
 
195
- <!-- Neue Betriebsmodus-Sektion -->
196
  <div class="mt-4 border-t pt-4">
197
  <h3 class="text-sm font-medium text-gray-700 mb-2">Betriebsmodus</h3>
198
  <div class="grid grid-cols-2 gap-2">
199
- <button id="standardModeBtn" class="text-sm py-1 px-3 bg-imacon text-white rounded hover:bg-imacon/90">
200
  Standard
201
  </button>
202
- <button id="expertModeBtn" class="text-sm py-1 px-3 bg-gray-200 text-gray-700 rounded hover:bg-gray-300">
203
  Expert
204
  </button>
205
  </div>
206
  <p id="modeDescription" class="text-xs text-gray-500 mt-1">Standardmodus für einfache Scans</p>
207
  </div>
208
 
209
- <!-- Neue Scaneinstellungen-Sektion -->
210
  <div id="scanSettings" class="mt-4 border-t pt-4 space-y-2">
211
  <h3 class="text-sm font-medium text-gray-700 mb-2">Scan-Parameter</h3>
212
 
@@ -221,7 +250,7 @@
221
  </select>
222
  </div>
223
 
224
- <!-- Erweiterte Filmsimulation mit 10 Filmen -->
225
  <div>
226
  <label for="filmSimulation" class="block text-xs font-medium text-gray-600 mb-1">Filmsimulation</label>
227
  <select id="filmSimulation" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
@@ -239,6 +268,115 @@
239
  </select>
240
  </div>
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  <div class="mt-4 flex space-x-2">
243
  <button id="previewBtn" class="w-1/2 bg-gray-200 text-gray-800 py-2 px-4 rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed">
244
  <i class="fas fa-eye mr-1"></i> Vorschau
@@ -276,6 +414,9 @@
276
  <p class="text-sm">Kein Bild verfügbar.<br>Klicken Sie auf "Vorschau" oder "Scannen".</p>
277
  </div>
278
  <img id="previewImage" src="" alt="Scan-Ergebnis" class="hidden max-w-full max-h-full object-contain">
 
 
 
279
  </div>
280
 
281
  <!-- Erweiterte Bildeinstellungen -->
@@ -323,7 +464,7 @@
323
  </div>
324
  </div>
325
 
326
- <!-- Neue Sättigungs-Slider -->
327
  <div>
328
  <label class="block text-sm font-medium text-gray-700 mb-1">Sättigung</label>
329
  <input type="range" min="-100" max="100" value="0" class="slider" id="saturationSlider">
@@ -334,7 +475,7 @@
334
  </div>
335
  </div>
336
 
337
- <!-- Neue Verlaufskorrektur -->
338
  <div>
339
  <label class="block text-sm font-medium text-gray-700 mb-1">Verlaufskorrektur</label>
340
  <input type="range" min="0" max="100" value="0" class="slider" id="gradationSlider">
@@ -344,12 +485,41 @@
344
  <span>Hart</span>
345
  </div>
346
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  </div>
348
 
349
- <!-- Histogramm-Anzeige -->
350
  <div class="mt-4 bg-gray-50 p-2 rounded border border-gray-200">
351
  <div class="flex justify-between items-center mb-1">
352
- <span class="text-xs font-medium text-gray-700">Histogramm</span>
 
 
 
 
 
 
 
 
353
  <span class="text-xs text-gray-500" id="histogramInfo">RGB-Verteilung</span>
354
  </div>
355
  <div class="h-16 w-full bg-gray-200 rounded" id="histogramContainer">
@@ -360,6 +530,13 @@
360
  <div class="h-3/4 w-full bg-blue-500 opacity-30 ml-1"></div>
361
  </div>
362
  </div>
 
 
 
 
 
 
 
363
  </div>
364
 
365
  <div class="flex justify-between mt-4">
@@ -369,8 +546,8 @@
369
  <button id="resetSettingsBtn" class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300">
370
  <i class="fas fa-undo mr-1"></i> Zurücksetzen
371
  </button>
372
- <button id="developerModeBtn" class="px-4 py-2 bg-yellow-200 text-yellow-800 rounded hover:bg-yellow-300">
373
- <i class="fas fa-code mr-1"></i> Developer Exit
374
  </button>
375
  </div>
376
  </div>
@@ -400,6 +577,10 @@
400
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
401
  <span>System muss Thunderbolt-Geräte unterstützen</span>
402
  </li>
 
 
 
 
403
  </ul>
404
  </div>
405
 
@@ -416,21 +597,29 @@
416
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
417
  <span>Verwenden Sie ein Firewire-400 oder -800-Kabel</span>
418
  </li>
 
 
 
 
419
  </ul>
420
  </div>
421
 
422
  <div class="bg-gray-50 p-3 rounded border border-gray-200">
423
  <h3 class="text-sm font-medium text-gray-700 mb-1 flex items-center">
424
- <i class="fas fa-usb text-imacon mr-1"></i> Allgemeine Hilfe
425
  </h3>
426
  <ul class="text-xs text-gray-600 space-y-1">
427
  <li class="flex items-start">
428
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
429
- <span>Stellen Sie sicher, dass der Scanner eingeschaltet ist</span>
430
  </li>
431
  <li class="flex items-start">
432
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
433
- <span>Klicken Sie auf "Scanner suchen", falls Probleme auftreten</span>
 
 
 
 
434
  </li>
435
  </ul>
436
  </div>
@@ -440,7 +629,7 @@
440
  </div>
441
 
442
  <script>
443
- // Scanner-Simulation mit erweiterter Anschluss-Unterstützung
444
  const scanBtn = document.getElementById('scanBtn');
445
  const previewBtn = document.getElementById('previewBtn');
446
  const connectBtn = document.getElementById('connectBtn');
@@ -457,6 +646,8 @@
457
  const scannerModel = document.getElementById('scannerModel');
458
  const scannerVendor = document.getElementById('scannerVendor');
459
  const scannerType = document.getElementById('scannerType');
 
 
460
  const scannerDetails = document.getElementById('scannerDetails');
461
  const connectionMethodBtn = document.getElementById('connectionMethodBtn');
462
  const connectionMethodModal = document.getElementById('connectionMethodModal');
@@ -475,6 +666,10 @@
475
  const saturationValue = document.getElementById('saturationValue');
476
  const gradationSlider = document.getElementById('gradationSlider');
477
  const gradationValue = document.getElementById('gradationValue');
 
 
 
 
478
  const saveImageBtn = document.getElementById('saveImageBtn');
479
  const resetSettingsBtn = document.getElementById('resetSettingsBtn');
480
  const developerModeBtn = document.getElementById('developerModeBtn');
@@ -486,15 +681,36 @@
486
  const transparencyMode = document.getElementById('transparencyMode');
487
  const filmSimulation = document.getElementById('filmSimulation');
488
  const scanSettings = document.getElementById('scanSettings');
 
489
  const histogramContainer = document.getElementById('histogramContainer');
490
  const histogramInfo = document.getElementById('histogramInfo');
491
  const infoBtn = document.getElementById('infoBtn');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
 
493
  // Zustandsvariablen
494
  let currentScanner = null;
495
  let isConnected = false;
496
  let isScanning = false;
497
  let isExpertMode = false;
 
498
  let currentConnectionMethod = 'any';
499
  let connectionMethodsAvailable = {
500
  usb: false,
@@ -504,13 +720,19 @@
504
 
505
  // Event Listener
506
  connectBtn.addEventListener('click', () => {
507
- if (scannerSelect.value) {
 
 
508
  connectToScanner(scannerSelect.value);
509
  }
510
  });
511
 
512
  refreshDevicesBtn.addEventListener('click', () => {
513
- discoverScanners();
 
 
 
 
514
  });
515
 
516
  connectionMethodBtn.addEventListener('click', () => {
@@ -527,22 +749,45 @@
527
  statusMessage.textContent = "Verbindungseinstellungen aktualisiert";
528
 
529
  // Neu nach Scannern suchen mit den neuen Einstellungen
530
- discoverScanners();
 
 
 
 
531
  });
532
 
533
  scanBtn.addEventListener('click', async () => {
534
  if (!isConnected) return;
535
 
536
  isScanning = true;
537
- updateScanButtons();
538
  scannerLight.classList.add('scanner-active');
539
 
540
  // Simuliere den Scan-Vorgang mit aktiven Parametern
541
  progressContainer.classList.remove('hidden');
542
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  let progress = 0;
544
  const interval = setInterval(() => {
545
- progress += Math.random() * 5;
 
 
 
 
 
546
  if (progress >= 100) {
547
  progress = 100;
548
  clearInterval(interval);
@@ -551,13 +796,16 @@
551
 
552
  progressBar.style.width = `${progress}%`;
553
  progressPercent.textContent = `${Math.floor(progress)}%`;
 
 
 
 
 
 
554
  }, 100);
555
 
556
  // Zeige aktive Scan-Parameter
557
- const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
558
- const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
559
-
560
- statusMessage.textContent = `Scan läuft... (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})`;
561
  });
562
 
563
  previewBtn.addEventListener('click', async () => {
@@ -566,17 +814,25 @@
566
  scannerLight.classList.add('scanner-active');
567
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
568
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
 
569
 
570
- statusMessage.textContent = `Erstelle Vorschau (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})...`;
571
 
572
  // Simuliere eine kurze Vorschau
573
  setTimeout(() => {
574
  placeSampleImage();
575
  scannerLight.classList.remove('scanner-active');
576
- statusMessage.textContent = "Vorschau erfolgreich erstellt";
 
577
  }, 800);
 
 
 
 
 
578
  });
579
 
 
580
  brightnessSlider.addEventListener('input', () => {
581
  brightnessValue.textContent = brightnessSlider.value;
582
  applyImageAdjustments();
@@ -607,7 +863,18 @@
607
  applyImageAdjustments();
608
  });
609
 
 
 
 
 
 
 
 
 
 
 
610
  resetSettingsBtn.addEventListener('click', () => {
 
611
  brightnessSlider.value = 100;
612
  contrastSlider.value = 100;
613
  sharpnessSlider.value = 50;
@@ -622,6 +889,34 @@
622
  saturationValue.textContent = '0';
623
  gradationValue.textContent = '0';
624
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
625
  applyImageAdjustments();
626
  });
627
 
@@ -631,63 +926,155 @@
631
  // Simuliere das Speichern eines Bildes mit aktuellen Einstellungen
632
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
633
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
634
- const fileName = `scan_${new Date().toISOString().slice(0, 10)}_${transMode.replace(/\s+/g, '')}_${filmSim !== 'Keine' ? filmSim.replace(/\s+/g, '') : 'Standard'}.tif`;
 
 
 
635
 
636
  statusMessage.textContent = `Bild gespeichert als ${fileName}`;
637
 
638
  // In der echten App würden wir hier eine Speicherdatei-Dialogbox öffnen
 
639
  });
640
 
641
  standardModeBtn.addEventListener('click', () => {
642
  isExpertMode = false;
 
 
643
  standardModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
644
  standardModeBtn.classList.replace('text-gray-700', 'text-white');
645
  expertModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
646
  expertModeBtn.classList.replace('text-white', 'text-gray-700');
647
  modeDescription.textContent = "Standardmodus mit vereinfachten Einstellungen";
648
 
649
- // Vereinfachte Einstellungen im Standardmodus
650
- transparencyMode.value = 'auto';
651
- filmSimulation.value = 'none';
652
- brightnessSlider.value = 100;
653
- contrastSlider.value = 100;
654
- sharpnessSlider.value = 50;
655
- colorBalanceSlider.value = 0;
656
- saturationSlider.value = 0;
657
- gradationSlider.value = 0;
658
 
659
- brightnessValue.textContent = '100';
660
- contrastValue.textContent = '100';
661
- sharpnessValue.textContent = '50';
662
- colorBalanceValue.textContent = '0';
663
- saturationValue.textContent = '0';
664
- gradationValue.textContent = '0';
665
-
666
- applyImageAdjustments();
667
  });
668
 
669
  expertModeBtn.addEventListener('click', () => {
670
  isExpertMode = true;
 
 
671
  expertModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
672
  expertModeBtn.classList.replace('text-gray-700', 'text-white');
673
  standardModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
674
  standardModeBtn.classList.replace('text-white', 'text-gray-700');
675
  modeDescription.textContent = "Expertenmodus mit Vollzugriff auf alle Einstellungen";
 
 
 
 
 
676
  });
677
 
678
  developerModeBtn.addEventListener('click', () => {
679
- toggleDeveloperMode();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  });
681
 
682
  infoBtn.addEventListener('click', () => {
683
- alert('Imacon Flextight X5 Scanner Control\n\nDiese Anwendung simuliert die Steuerung eines hochwertigen Filmscanners. In einer echten Implementierung würde sie über Thunderbolt, Firewire oder USB mit dem Scanner kommunizieren.');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  });
685
 
686
  // Hilfsfunktionen
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  function completeScan() {
688
  isScanning = false;
689
  scannerLight.classList.remove('scanner-active');
690
- updateScanButtons();
691
 
692
  // Setze das Beispielbild
693
  placeSampleImage();
@@ -695,10 +1082,11 @@
695
  // Update Scan-Informationen
696
  updateScanInfo();
697
 
 
698
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
699
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
700
 
701
- statusMessage.textContent = `Scan abgeschlossen (${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})`;
702
  }
703
 
704
  function placeSampleImage() {
@@ -729,6 +1117,9 @@
729
 
730
  // Setze das entsprechende Bild
731
  previewImage.src = imageUrl;
 
 
 
732
  previewImage.classList.remove('hidden');
733
  placeholderText.classList.add('hidden');
734
  saveImageBtn.disabled = false;
@@ -739,367 +1130,8 @@
739
 
740
  function updateHistogram() {
741
  // In einer echten App würden wir hier ein echtes Histogramm berechnen
742
- // Für die Demo basieren wir das Histogramm auf der gewählten Filmsimulation
743
- const filmSim = filmSimulation.value;
744
- let redHeight, greenHeight, blueHeight;
745
-
746
- if (filmSim === 'velvia') {
747
- // Velvia: gesättigte Farben
748
- redHeight = '90%';
749
- greenHeight = '80%';
750
- blueHeight = '60%';
751
- } else if (filmSim === 'ektar') {
752
- // Ektar: lebendige Farben
753
- redHeight = '85%';
754
- greenHeight = '75%';
755
- blueHeight = '70%';
756
- } else if (filmSim.startsWith('portra')) {
757
- // Portra: weiche Hauttöne
758
- redHeight = '60%';
759
- greenHeight = '65%';
760
- blueHeight = '50%';
761
- } else if (filmSim === 'astia') {
762
- // Astia: weiche Farben
763
- redHeight = '55%';
764
- greenHeight = '60%';
765
- blueHeight = '55%';
766
- } else if (filmSim === 'provia') {
767
- // Provia: neutrale Farben
768
- redHeight = '65%';
769
- greenHeight = '70%';
770
- blueHeight = '65%';
771
- } else if (filmSim === 'tri-x' || filmSim === 'tmax400' || filmSim === 'hp5') {
772
- // Schwarzweiß-Filme
773
- redHeight = '70%';
774
- greenHeight = '70%';
775
- blueHeight = '70%';
776
- histogramInfo.textContent = "Luminanz-Verteilung (Schwarzweiß)";
777
- } else {
778
- // Standard (keine Simulation)
779
- redHeight = '70%';
780
- greenHeight = '75%';
781
- blueHeight = '65%';
782
- histogramInfo.textContent = "RGB-Verteilung (3-Kanal Histogramm)";
783
- }
784
-
785
- histogramContainer.innerHTML = `
786
- <div class="h-full flex items-end">
787
- <div class="h-${redHeight} w-full bg-red-500 opacity-30"></div>
788
- <div class="h-${greenHeight} w-full bg-green-500 opacity-30 ml-1"></div>
789
- <div class="h-${blueHeight} w-full bg-blue-500 opacity-30 ml-1"></div>
790
- </div>
791
- `;
792
- }
793
-
794
- function applyImageAdjustments() {
795
- // In einer echten App würden wir die Bildfilter anwenden
796
- if (!previewImage.src) return;
797
-
798
- const settings = {
799
- brightness: brightnessValue.textContent,
800
- contrast: contrastValue.textContent,
801
- sharpness: sharpnessValue.textContent,
802
- colorBalance: colorBalanceValue.textContent,
803
- saturation: saturationValue.textContent,
804
- gradation: gradationValue.textContent
805
- };
806
-
807
- const currentInfo = scanInfo.querySelector('p:first-child') || document.createElement('p');
808
- currentInfo.textContent = `Bildeinstellungen: Helligkeit ${settings.brightness}%, Kontrast ${settings.contrast}%, Schärfe ${settings.sharpness}%, Sättigung ${settings.saturation}%`;
809
-
810
- if (!scanInfo.querySelector('p:first-child')) {
811
- scanInfo.insertBefore(currentInfo, scanInfo.firstChild);
812
- }
813
-
814
- // Aktualisiere das Histogramm bei Änderungen
815
- updateHistogram();
816
-
817
- // Simuliere eine Bildaktualisierung
818
- previewImage.style.filter = `
819
- brightness(${settings.brightness}%)
820
- contrast(${settings.contrast}%)
821
- saturate(${100 + parseInt(settings.saturation)}%)
822
- `;
823
- }
824
-
825
- function updateScanButtons() {
826
- scanBtn.disabled = !isConnected || isScanning;
827
- previewBtn.disabled = !isConnected || isScanning;
828
- }
829
-
830
- function updateScanInfo() {
831
- const scanDate = new Date().toLocaleString();
832
- let connectionType = currentScanner?.connection || 'unknown';
833
- const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
834
- const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
835
 
836
- scanInfo.innerHTML = `
837
- <p class="mb-2">Letzter Scan: <strong>${scanDate}</strong></p>
838
- <p class="mb-2">Modus: <strong>${transMode}</strong> ${filmSim !== 'Keine' ? 'mit <strong>'+filmSim+'</strong>-Simulation' : ''}</p>
839
- <p class="mb-2">Auflösung: <strong>3200 dpi</strong> (Maximal)</p>
840
- <p class="mb-2">Farbtiefe: <strong>16-Bit pro Kanal</strong> (48-Bit Farben)</p>
841
- <p class="text-xs text-gray-500">Scanner: ${currentScanner?.vendor || 'Unknown'} ${currentScanner?.model || 'Unknown'}</p>
842
- `;
843
-
844
- // Verbindungsinfo
845
- if (currentScanner) {
846
- connectionInfo.classList.remove('hidden');
847
- let connectionText = '';
848
-
849
- switch(currentScanner.connection) {
850
- case 'thunderbolt':
851
- connectionText = 'Verbindung via Thunderbolt (höchste Geschwindigkeit)';
852
- break;
853
- case 'firewire':
854
- connectionText = 'Verbindung via Firewire (mittlere Geschwindigkeit)';
855
- break;
856
- default:
857
- connectionText = 'Verbindung via USB (Standard-Geschwindigkeit)';
858
- }
859
-
860
- connectionTypeInfo.textContent = connectionText;
861
- }
862
- }
863
-
864
- function toggleDeveloperMode() {
865
- // Hier würde in einer echten App auf die tatsächliche Geräte-API umgeschaltet
866
- statusMessage.textContent = "Verlasse Developer Modus - Verbinde jetzt mit echten Geräten...";
867
-
868
- // Simuliere die Verbindung mit echten Geräten
869
- setTimeout(() => {
870
- discoverRealDevices();
871
- }, 1500);
872
- }
873
-
874
- function discoverScanners() {
875
- statusMessage.textContent = `Suche nach Scannern (${getConnectionMethodName(currentConnectionMethod)})...`;
876
-
877
- try {
878
- // Für die Demo: Simuliere das Finden eines Scanners
879
- const scannerDevices = [{
880
- name: 'imacon:thunderbolt:001',
881
- model: 'Flextight X5',
882
- vendor: 'Imacon',
883
- type: 'Filmscanner',
884
- connection: 'thunderbolt'
885
- }];
886
-
887
- populateScannerList(scannerDevices);
888
-
889
- // Update connection info in UI
890
- const connectionElem = connectionStatus.querySelector('span:nth-child(2)');
891
- connectionElem.textContent = "Thunderbolt verfügbar";
892
- connectionElem.nextElementSibling.querySelector('#connectionTooltip').textContent =
893
- "Verfügbare Schnittstellen: Thunderbolt";
894
-
895
- statusMessage.textContent = "1 Scanner gefunden über Thunderbolt";
896
- } catch (error) {
897
- console.error("Scanner discovery error:", error);
898
- statusMessage.textContent = "Fehler bei der Scanner-Suche";
899
- }
900
- }
901
-
902
- function discoverRealDevices() {
903
- statusMessage.textContent = "Suche nach echten angeschlossenen Geräten...";
904
-
905
- try {
906
- // Für die Demo: Simuliere das Finden eines echten Geräts
907
- const realDevices = [{
908
- name: 'imacon:real:thunderbolt:001',
909
- model: 'Flextight X5',
910
- vendor: 'Imacon',
911
- type: 'Filmscanner',
912
- connection: 'thunderbolt',
913
- isRealDevice: true
914
- }];
915
-
916
- populateScannerList(realDevices);
917
- statusMessage.textContent = "1 echtes Gerät gefunden (Imacon Flextight X5)";
918
- } catch (error) {
919
- console.error("Error detecting real devices:", error);
920
- statusMessage.textContent = "Fehler bei der Erkennung echter Geräte";
921
- }
922
- }
923
-
924
- // Hilfsfunktionen für Verbindungsmethoden
925
- function getConnectionMethodName(method) {
926
- const names = {
927
- 'any': 'Automatisch',
928
- 'usb': 'USB',
929
- 'firewire': 'Firewire',
930
- 'thunderbolt': 'Thunderbolt'
931
- };
932
- return names[method] || method;
933
- }
934
-
935
- // Verbindungsaufbau aktualisiert für verschiedene Schnittstellen
936
- async function connectToScanner(scannerName) {
937
- const selectedScanner = scannerSelect.options[scannerSelect.selectedIndex];
938
- const connectionType = selectedScanner.getAttribute('data-connection') || 'usb';
939
-
940
- statusMessage.textContent = `Verbinde über ${getConnectionMethodName(connectionType)}...`;
941
- updateConnectionStatus('connecting');
942
-
943
- try {
944
- // Simuliere unterschiedliche Verbindungszeiten
945
- let connectTime = 1000;
946
- if (connectionType === 'thunderbolt') connectTime = 800;
947
- if (connectionType === 'firewire') connectTime = 1200;
948
-
949
- await new Promise(resolve => setTimeout(resolve, connectTime));
950
-
951
- currentScanner = {
952
- name: scannerName,
953
- model: 'Flextight X5',
954
- vendor: 'Imacon',
955
- type: 'Filmscanner',
956
- connection: connectionType
957
- };
958
-
959
- isConnected = true;
960
- updateConnectionStatus(connectionType);
961
- updateScannerDetails(currentScanner);
962
-
963
- // Aktiviere die Scan-Buttons
964
- scanBtn.disabled = false;
965
- previewBtn.disabled = false;
966
- connectBtn.textContent = "Trennen";
967
- connectBtn.classList.remove('bg-imacon');
968
- connectBtn.classList.add('bg-red-500', 'hover:bg-red-600');
969
-
970
- // Neue Event Listener für das Trennen
971
- connectBtn.onclick = () => {
972
- disconnectScanner();
973
- };
974
-
975
- statusMessage.textContent = `Erfolgreich verbunden via ${getConnectionMethodName(connectionType)}`;
976
- updateScanInfo();
977
- } catch (error) {
978
- console.error("Connection error:", error);
979
- statusMessage.textContent = `Verbindung fehlgeschlagen über ${getConnectionMethodName(connectionType)}`;
980
- updateConnectionStatus('disconnected');
981
- }
982
- }
983
-
984
- function disconnectScanner() {
985
- isConnected = false;
986
- currentScanner = null;
987
- updateConnectionStatus('disconnected');
988
-
989
- // Deaktiviere die Scan-Buttons
990
- scanBtn.disabled = true;
991
- previewBtn.disabled = true;
992
- connectBtn.textContent = "Verbinden";
993
- connectBtn.classList.remove('bg-red-500', 'hover:bg-red-600');
994
- connectBtn.classList.add('bg-imacon');
995
-
996
- // Zurück zum ursprünglichen Event Listener
997
- connectBtn.onclick = () => {
998
- if (scannerSelect.value) {
999
- connectToScanner(scannerSelect.value);
1000
- }
1001
- };
1002
-
1003
- statusMessage.textContent = "Verbindung getrennt";
1004
- }
1005
-
1006
- function updateScannerDetails(scanner) {
1007
- scannerModel.textContent = scanner.model;
1008
- scannerVendor.textContent = scanner.vendor;
1009
- scannerType.textContent = `${scanner.type} (${scanner.connection.toUpperCase()})`;
1010
-
1011
- // Highlight die Verbindungsart in der Anzeige
1012
- scannerType.className = '';
1013
- if (scanner.connection === 'thunderbolt') {
1014
- scannerType.classList.add('text-thunderbolt', 'font-medium');
1015
- } else if (scanner.connection === 'firewire') {
1016
- scannerType.classList.add('text-firewire', 'font-medium');
1017
- } else {
1018
- scannerType.classList.add('text-imacon', 'font-medium');
1019
- }
1020
-
1021
- scannerDetails.classList.remove('hidden');
1022
- }
1023
-
1024
- // Scanner-Liste mit Verbindungsinformationen
1025
- function populateScannerList(scanners) {
1026
- scannerSelect.innerHTML = '<option value="">Scanner auswählen...</option>';
1027
-
1028
- scanners.forEach(scanner => {
1029
- const option = document.createElement('option');
1030
- option.value = scanner.name;
1031
- option.textContent = `${scanner.vendor} ${scanner.model}`;
1032
- option.setAttribute('data-connection', scanner.connection);
1033
-
1034
- // Füge Verbindungs-Icon hinzu
1035
- let icon = '';
1036
- if (scanner.connection === 'thunderbolt') {
1037
- icon = '⚡';
1038
- } else if (scanner.connection === 'firewire') {
1039
- icon = '🔥';
1040
- } else {
1041
- icon = '🔌';
1042
- }
1043
-
1044
- option.textContent = `${icon} ${scanner.vendor} ${scanner.model}`;
1045
-
1046
- scannerSelect.appendChild(option);
1047
- });
1048
- }
1049
-
1050
- function updateConnectionStatus(connectionType) {
1051
- const statusIndicator = connectionStatus.querySelector('span:first-child');
1052
- const statusText = connectionStatus.querySelector('span:nth-child(2)');
1053
-
1054
- statusIndicator.className = 'h-3 w-3 rounded-full mr-2';
1055
-
1056
- switch(connectionType) {
1057
- case 'thunderbolt':
1058
- statusIndicator.classList.add('bg-thunderbolt');
1059
- statusText.textContent = 'Verbunden (Thunderbolt)';
1060
- statusText.nextElementSibling.querySelector('#connectionTooltip').textContent =
1061
- 'Hochgeschwindigkeitsverbindung via Thunderbolt';
1062
- break;
1063
- case 'firewire':
1064
- statusIndicator.classList.add('bg-firewire');
1065
- statusText.textContent = 'Verbunden (Firewire)';
1066
- statusText.nextElementSibling.querySelector('#connectionTooltip').textContent =
1067
- 'Stabile Verbindung via Firewire (IEEE 1394)';
1068
- break;
1069
- case 'usb':
1070
- statusIndicator.classList.add('bg-imacon');
1071
- statusText.textContent = 'Verbunden (USB)';
1072
- statusText.nextElementSibling.querySelector('#connectionTooltip').textContent =
1073
- 'Standard USB-Verbindung';
1074
- break;
1075
- case 'connecting':
1076
- statusIndicator.classList.add('bg-yellow-500');
1077
- statusText.textContent = 'Verbinde...';
1078
- break;
1079
- default:
1080
- statusIndicator.classList.add('bg-gray-500');
1081
- statusText.textContent = 'Nicht verbunden';
1082
- }
1083
- }
1084
-
1085
- // Initialisierung
1086
- document.addEventListener('DOMContentLoaded', () => {
1087
- // Starte mit der Scanner-Suche
1088
- discoverScanners();
1089
-
1090
- // Setze Standardwerte für Slider
1091
- brightnessValue.textContent = brightnessSlider.value;
1092
- contrastValue.textContent = contrastSlider.value;
1093
- sharpnessValue.textContent = sharpnessSlider.value;
1094
- colorBalanceValue.textContent = colorBalanceSlider.value;
1095
- saturationValue.textContent = saturationSlider.value;
1096
- gradationValue.textContent = gradationSlider.value;
1097
-
1098
- // Deaktiviere Buttons anfangs
1099
- scanBtn.disabled = true;
1100
- previewBtn.disabled = true;
1101
- saveImageBtn.disabled = true;
1102
- });
1103
- </script>
1104
- <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=WDFluho/flextight-control" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1105
  </html>
 
14
  imacon: '#005293',
15
  imaconlight: '#e6f0f8',
16
  firewire: '#FF4500',
17
+ thunderbolt: '#0071C5',
18
+ expertdark: '#2d3748'
19
  }
20
  }
21
  }
 
88
  .film-option:hover {
89
  background-color: #f0f0f0;
90
  }
91
+
92
+ /* Expertise mode border */
93
+ .expert-border {
94
+ border: 2px dashed #4a5568;
95
+ }
96
+
97
+ /* Hidden by default, shown in expert mode */
98
+ .expert-only {
99
+ display: none;
100
+ }
101
+
102
+ .expert-mode .expert-only {
103
+ display: block;
104
+ }
105
+
106
+ /* Expert settings highlight */
107
+ .expert-setting {
108
+ background-color: #f8fafc;
109
+ border-left: 3px solid #4a5568;
110
+ }
111
  </style>
112
  </head>
113
  <body class="bg-gray-100">
 
183
  <!-- Main Content -->
184
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
185
  <!-- Scanner Control Panel -->
186
+ <div id="scannerPanel" class="lg:col-span-1 bg-white rounded-lg shadow p-6">
187
  <h2 class="text-lg font-semibold text-gray-800 mb-4">Scanner-Steuerung</h2>
188
 
189
  <div class="space-y-4">
 
211
  <span class="text-gray-600">Typ:</span>
212
  <span id="scannerType" class="font-medium">-</span>
213
  </div>
214
+ <div class="flex justify-between">
215
+ <span class="text-gray-600">Max. Auflösung:</span>
216
+ <span id="scannerResolution" class="font-medium">-</span>
217
+ </div>
218
+ <div class="flex justify-between">
219
+ <span class="text-gray-600">Dichtebereich:</span>
220
+ <span id="scannerDynamicRange" class="font-medium">-</span>
221
+ </div>
222
  </div>
223
 
224
+ <!-- Betriebsmodus-Sektion -->
225
  <div class="mt-4 border-t pt-4">
226
  <h3 class="text-sm font-medium text-gray-700 mb-2">Betriebsmodus</h3>
227
  <div class="grid grid-cols-2 gap-2">
228
+ <button id="standardModeBtn" class="text-sm py-1 px-3 bg-imacon text-white rounded hover:bg-imacon/90 transition">
229
  Standard
230
  </button>
231
+ <button id="expertModeBtn" class="text-sm py-1 px-3 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 transition">
232
  Expert
233
  </button>
234
  </div>
235
  <p id="modeDescription" class="text-xs text-gray-500 mt-1">Standardmodus für einfache Scans</p>
236
  </div>
237
 
238
+ <!-- Scaneinstellungen-Sektion -->
239
  <div id="scanSettings" class="mt-4 border-t pt-4 space-y-2">
240
  <h3 class="text-sm font-medium text-gray-700 mb-2">Scan-Parameter</h3>
241
 
 
250
  </select>
251
  </div>
252
 
253
+ <!-- Filmsimulation mit 10 gängigen Filmen -->
254
  <div>
255
  <label for="filmSimulation" class="block text-xs font-medium text-gray-600 mb-1">Filmsimulation</label>
256
  <select id="filmSimulation" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
 
268
  </select>
269
  </div>
270
 
271
+ <!-- Experten-Einstellungen -->
272
+ <div id="expertSettings" class="expert-only space-y-2 mt-3 pt-3 border-t border-dashed border-gray-200">
273
+ <h4 class="text-xs font-medium text-gray-700 mb-1">Experten-Einstellungen</h4>
274
+
275
+ <!-- Auflösung -->
276
+ <div class="expert-setting p-2 rounded">
277
+ <label for="resolutionSelect" class="block text-xs font-medium text-gray-600 mb-1">Scan-Auflösung (dpi)</label>
278
+ <select id="resolutionSelect" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
279
+ <option value="800">800 dpi (Vorschau)</option>
280
+ <option value="1600">1600 dpi (Standard)</option>
281
+ <option value="3200" selected>3200 dpi (Hohe Qualität)</option>
282
+ <option value="4800">4800 dpi (Premium)</option>
283
+ <option value="6400">6400 dpi (Maximale Auflösung)</option>
284
+ </select>
285
+ </div>
286
+
287
+ <!-- Ausgabegröße -->
288
+ <div class="expert-setting p-2 rounded">
289
+ <label for="outputSize" class="block text-xs font-medium text-gray-600 mb-1">
290
+ Ausgabegröße
291
+ <span id="outputSizeLabel" class="text-xs text-gray-400">(Original)</span>
292
+ </label>
293
+ <div class="flex items-center space-x-2">
294
+ <select id="outputSizeMode" class="w-1/2 p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
295
+ <option value="original">Original</option>
296
+ <option value="percentage">Prozent</option>
297
+ <option value="fixed-width">Feste Breite</option>
298
+ <option value="fixed-height">Feste Höhe</option>
299
+ </select>
300
+ <input id="outputSizeValue" type="number" min="1" max="5000" value="100"
301
+ class="w-1/2 p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon" disabled>
302
+ <select id="outputSizeUnit" class="w-1/4 p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon hidden">
303
+ <option value="percent">%</option>
304
+ <option value="pixels">px</option>
305
+ <option value="cm">cm</option>
306
+ <option value="inches">inch</option>
307
+ </select>
308
+ </div>
309
+ </div>
310
+
311
+ <!-- Farbraum -->
312
+ <div class="expert-setting p-2 rounded">
313
+ <label for="colorspaceSelect" class="block text-xs font-medium text-gray-600 mb-1">Farbraum</label>
314
+ <select id="colorspaceSelect" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
315
+ <option value="srgb">sRGB (Standard)</option>
316
+ <option value="adobe-rgb">Adobe RGB (1998)</option>
317
+ <option value="prophoto">ProPhoto RGB</option>
318
+ <option value="eci-rgb-v2">ECI-RGB v2</option>
319
+ <option value="grayscale">16-Bit Graustufen</option>
320
+ </select>
321
+ </div>
322
+
323
+ <!-- Multipass Scanning -->
324
+ <div class="expert-setting p-2 rounded">
325
+ <label class="block text-xs font-medium text-gray-600 mb-1">Multipass Scanning</label>
326
+ <div class="flex items-center">
327
+ <input type="checkbox" id="multipassCheck" class="mr-2 rounded border-gray-300 text-imacon focus:ring-imacon">
328
+ <label for="multipassCheck" class="text-xs">Mehrfach-Scan zur Rauschreduktion</label>
329
+ </div>
330
+
331
+ <div id="multipassControls" class="mt-1 hidden ml-6">
332
+ <div class="flex items-center space-x-2">
333
+ <label for="multipassCount" class="text-xs text-gray-600">Passagen:</label>
334
+ <select id="multipassCount" class="p-1 text-xs border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
335
+ <option value="2">2x</option>
336
+ <option value="4">4x</option>
337
+ <option value="8">8x</option>
338
+ <option value="16">16x</option>
339
+ </select>
340
+ </div>
341
+ </div>
342
+ </div>
343
+
344
+ <!-- Fortgeschrittene ROI-Einstellungen -->
345
+ <div class="expert-setting p-2 rounded">
346
+ <label class="block text-xs font-medium text-gray-600 mb-1">Scan-Bereich (ROI)</label>
347
+ <div class="grid grid-cols-2 gap-2">
348
+ <div>
349
+ <label for="roiX" class="block text-2xs text-gray-500 mb-1">X-Position</label>
350
+ <input type="number" id="roiX" min="0" max="100" value="0" class="w-full p-1 text-sm border rounded">
351
+ </div>
352
+ <div>
353
+ <label for="roiY" class="block text-2xs text-gray-500 mb-1">Y-Position</label>
354
+ <input type="number" id="roiY" min="0" max="100" value="0" class="w-full p-1 text-sm border rounded">
355
+ </div>
356
+ <div>
357
+ <label for="roiWidth" class="block text-2xs text-gray-500 mb-1">Breite</label>
358
+ <input type="number" id="roiWidth" min="1" max="100" value="100" class="w-full p-1 text-sm border rounded">
359
+ </div>
360
+ <div>
361
+ <label for="roiHeight" class="block text-2xs text-gray-500 mb-1">Höhe</label>
362
+ <input type="number" id="roiHeight" min="1" max="100" value="100" class="w-full p-1 text-sm border rounded">
363
+ </div>
364
+ </div>
365
+ </div>
366
+
367
+ <!-- Dunkelstrom-Kompensation -->
368
+ <div class="expert-setting p-2 rounded">
369
+ <label for="darkCurrentComp" class="block text-xs font-medium text-gray-600 mb-1">Dunkelstrom-Kompensation</label>
370
+ <select id="darkCurrentComp" class="w-full p-1 text-sm border rounded focus:ring-1 focus:ring-imacon/50 focus:border-imacon">
371
+ <option value="auto">Automatisch</option>
372
+ <option value="low">Gering</option>
373
+ <option value="medium">Mittel</option>
374
+ <option value="high">Hoch</option>
375
+ <option value="none">Keine</option>
376
+ </select>
377
+ </div>
378
+ </div>
379
+
380
  <div class="mt-4 flex space-x-2">
381
  <button id="previewBtn" class="w-1/2 bg-gray-200 text-gray-800 py-2 px-4 rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed">
382
  <i class="fas fa-eye mr-1"></i> Vorschau
 
414
  <p class="text-sm">Kein Bild verfügbar.<br>Klicken Sie auf "Vorschau" oder "Scannen".</p>
415
  </div>
416
  <img id="previewImage" src="" alt="Scan-Ergebnis" class="hidden max-w-full max-h-full object-contain">
417
+
418
+ <!-- ROI Rechteck für Expert Mode -->
419
+ <div id="roiRectangle" class="expert-only absolute border-2 border-yellow-400 pointer-events-none hidden" style="background-color: rgba(255, 255, 0, 0.2);"></div>
420
  </div>
421
 
422
  <!-- Erweiterte Bildeinstellungen -->
 
464
  </div>
465
  </div>
466
 
467
+ <!-- Sättigungs-Slider -->
468
  <div>
469
  <label class="block text-sm font-medium text-gray-700 mb-1">Sättigung</label>
470
  <input type="range" min="-100" max="100" value="0" class="slider" id="saturationSlider">
 
475
  </div>
476
  </div>
477
 
478
+ <!-- Verlaufskorrektur -->
479
  <div>
480
  <label class="block text-sm font-medium text-gray-700 mb-1">Verlaufskorrektur</label>
481
  <input type="range" min="0" max="100" value="0" class="slider" id="gradationSlider">
 
485
  <span>Hart</span>
486
  </div>
487
  </div>
488
+
489
+ <!-- Experten-Einstellungen für das Bild -->
490
+ <div class="expert-only">
491
+ <label class="block text-sm font-medium text-gray-700 mb-1">Dichteabgleich</label>
492
+ <input type="range" min="0" max="100" value="50" class="slider" id="densitySlider">
493
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
494
+ <span>Flach</span>
495
+ <span id="densityValue">50</span>
496
+ <span>Kontrastreich</span>
497
+ </div>
498
+ </div>
499
+
500
+ <div class="expert-only">
501
+ <label class="block text-sm font-medium text-gray-700 mb-1">Schattenkorrektur</label>
502
+ <input type="range" min="0" max="100" value="0" class="slider" id="shadowSlider">
503
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
504
+ <span>0%</span>
505
+ <span id="shadowValue">0</span>
506
+ <span>100%</span>
507
+ </div>
508
+ </div>
509
  </div>
510
 
511
+ <!-- Histogramm-Anzeige mit erweiterten Funktionen -->
512
  <div class="mt-4 bg-gray-50 p-2 rounded border border-gray-200">
513
  <div class="flex justify-between items-center mb-1">
514
+ <div class="flex items-center space-x-2">
515
+ <span class="text-xs font-medium text-gray-700">Histogramm</span>
516
+ <select id="histogramChannel" class="expert-only text-xs border rounded p-1" title="Histogramm-Kanal">
517
+ <option value="rgb">RGB</option>
518
+ <option value="red">Rot</option>
519
+ <option value="green">Grün</option>
520
+ <option value="blue">Blau</option>
521
+ </select>
522
+ </div>
523
  <span class="text-xs text-gray-500" id="histogramInfo">RGB-Verteilung</span>
524
  </div>
525
  <div class="h-16 w-full bg-gray-200 rounded" id="histogramContainer">
 
530
  <div class="h-3/4 w-full bg-blue-500 opacity-30 ml-1"></div>
531
  </div>
532
  </div>
533
+ <div class="expert-only flex justify-between mt-1">
534
+ <span class="text-2xs text-gray-500">0</span>
535
+ <span class="text-2xs text-gray-500">64</span>
536
+ <span class="text-2xs text-gray-500">128</span>
537
+ <span class="text-2xs text-gray-500">192</span>
538
+ <span class="text-2xs text-gray-500">255</span>
539
+ </div>
540
  </div>
541
 
542
  <div class="flex justify-between mt-4">
 
546
  <button id="resetSettingsBtn" class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300">
547
  <i class="fas fa-undo mr-1"></i> Zurücksetzen
548
  </button>
549
+ <button id="developerModeBtn" class="px-4 py-2 bg-red-200 text-red-800 rounded hover:bg-red-300">
550
+ <i class="fas fa-plug mr-1"></i> Hardware-Modus
551
  </button>
552
  </div>
553
  </div>
 
577
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
578
  <span>System muss Thunderbolt-Geräte unterstützen</span>
579
  </li>
580
+ <li class="flex items-start">
581
+ <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
582
+ <span>Für beste Performance direkt anbinden</span>
583
+ </li>
584
  </ul>
585
  </div>
586
 
 
597
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
598
  <span>Verwenden Sie ein Firewire-400 oder -800-Kabel</span>
599
  </li>
600
+ <li class="flex items-start">
601
+ <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
602
+ <span>Kette nicht mehr als 3 Geräte</span>
603
+ </li>
604
  </ul>
605
  </div>
606
 
607
  <div class="bg-gray-50 p-3 rounded border border-gray-200">
608
  <h3 class="text-sm font-medium text-gray-700 mb-1 flex items-center">
609
+ <i class="fas fa-hard-drive text-imacon mr-1"></i> Scan-Tipps
610
  </h3>
611
  <ul class="text-xs text-gray-600 space-y-1">
612
  <li class="flex items-start">
613
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
614
+ <span>Für Profi-Scans: Expertenmodus aktivieren</span>
615
  </li>
616
  <li class="flex items-start">
617
  <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
618
+ <span>Bei Problemen: USB als Alternative probieren</span>
619
+ </li>
620
+ <li class="flex items-start">
621
+ <i class="fas fa-check-circle text-green-500 mr-1 mt-0.5"></i>
622
+ <span>Stabiler Stromanschluss empfohlen</span>
623
  </li>
624
  </ul>
625
  </div>
 
629
  </div>
630
 
631
  <script>
632
+ // Scanner-Steuerung mit erweiterten Funktionen
633
  const scanBtn = document.getElementById('scanBtn');
634
  const previewBtn = document.getElementById('previewBtn');
635
  const connectBtn = document.getElementById('connectBtn');
 
646
  const scannerModel = document.getElementById('scannerModel');
647
  const scannerVendor = document.getElementById('scannerVendor');
648
  const scannerType = document.getElementById('scannerType');
649
+ const scannerResolution = document.getElementById('scannerResolution');
650
+ const scannerDynamicRange = document.getElementById('scannerDynamicRange');
651
  const scannerDetails = document.getElementById('scannerDetails');
652
  const connectionMethodBtn = document.getElementById('connectionMethodBtn');
653
  const connectionMethodModal = document.getElementById('connectionMethodModal');
 
666
  const saturationValue = document.getElementById('saturationValue');
667
  const gradationSlider = document.getElementById('gradationSlider');
668
  const gradationValue = document.getElementById('gradationValue');
669
+ const densitySlider = document.getElementById('densitySlider');
670
+ const densityValue = document.getElementById('densityValue');
671
+ const shadowSlider = document.getElementById('shadowSlider');
672
+ const shadowValue = document.getElementById('shadowValue');
673
  const saveImageBtn = document.getElementById('saveImageBtn');
674
  const resetSettingsBtn = document.getElementById('resetSettingsBtn');
675
  const developerModeBtn = document.getElementById('developerModeBtn');
 
681
  const transparencyMode = document.getElementById('transparencyMode');
682
  const filmSimulation = document.getElementById('filmSimulation');
683
  const scanSettings = document.getElementById('scanSettings');
684
+ const expertSettings = document.getElementById('expertSettings');
685
  const histogramContainer = document.getElementById('histogramContainer');
686
  const histogramInfo = document.getElementById('histogramInfo');
687
  const infoBtn = document.getElementById('infoBtn');
688
+ const scannerPanel = document.getElementById('scannerPanel');
689
+ const resolutionSelect = document.getElementById('resolutionSelect');
690
+ const outputSize = document.getElementById('outputSize');
691
+ const outputSizeMode = document.getElementById('outputSizeMode');
692
+ const outputSizeValue = document.getElementById('outputSizeValue');
693
+ const outputSizeUnit = document.getElementById('outputSizeUnit');
694
+ const outputSizeLabel = document.getElementById('outputSizeLabel');
695
+ const colorspaceSelect = document.getElementById('colorspaceSelect');
696
+ const multipassCheck = document.getElementById('multipassCheck');
697
+ const multipassControls = document.getElementById('multipassControls');
698
+ const multipassCount = document.getElementById('multipassCount');
699
+ const roiX = document.getElementById('roiX');
700
+ const roiY = document.getElementById('roiY');
701
+ const roiWidth = document.getElementById('roiWidth');
702
+ const roiHeight = document.getElementById('roiHeight');
703
+ const roiRectangle = document.getElementById('roiRectangle');
704
+ const darkCurrentComp = document.getElementById('darkCurrentComp');
705
+ const histogramChannel = document.getElementById('histogramChannel');
706
+ const previewContainer = document.getElementById('previewContainer');
707
 
708
  // Zustandsvariablen
709
  let currentScanner = null;
710
  let isConnected = false;
711
  let isScanning = false;
712
  let isExpertMode = false;
713
+ let isHardwareMode = false;
714
  let currentConnectionMethod = 'any';
715
  let connectionMethodsAvailable = {
716
  usb: false,
 
720
 
721
  // Event Listener
722
  connectBtn.addEventListener('click', () => {
723
+ if (isConnected) {
724
+ disconnectScanner();
725
+ } else if (scannerSelect.value) {
726
  connectToScanner(scannerSelect.value);
727
  }
728
  });
729
 
730
  refreshDevicesBtn.addEventListener('click', () => {
731
+ if (isHardwareMode) {
732
+ discoverRealDevices();
733
+ } else {
734
+ discoverScanners();
735
+ }
736
  });
737
 
738
  connectionMethodBtn.addEventListener('click', () => {
 
749
  statusMessage.textContent = "Verbindungseinstellungen aktualisiert";
750
 
751
  // Neu nach Scannern suchen mit den neuen Einstellungen
752
+ if (isHardwareMode) {
753
+ discoverRealDevices();
754
+ } else {
755
+ discoverScanners();
756
+ }
757
  });
758
 
759
  scanBtn.addEventListener('click', async () => {
760
  if (!isConnected) return;
761
 
762
  isScanning = true;
763
+ updateScanButtons(true);
764
  scannerLight.classList.add('scanner-active');
765
 
766
  // Simuliere den Scan-Vorgang mit aktiven Parametern
767
  progressContainer.classList.remove('hidden');
768
 
769
+ // Berücksichtige Expert-Einstellungen
770
+ const resolution = resolutionSelect.value;
771
+ const outputSize = outputSizeMode.value === 'original' ? 'Originalgröße' :
772
+ `${outputSizeValue.value}${outputSizeMode.value === 'percentage' ? '%' : outputSizeUnit.value}`;
773
+ const colorspace = colorspaceSelect.options[colorspaceSelect.selectedIndex].text;
774
+
775
+ let estimatedTime = 15; // Basierend auf 3200dpi
776
+ if (resolution >= 4800) estimatedTime = 30;
777
+ if (resolution <= 1600) estimatedTime = 10;
778
+
779
+ if (multipassCheck.checked) {
780
+ estimatedTime *= parseInt(multipassCount.value);
781
+ }
782
+
783
  let progress = 0;
784
  const interval = setInterval(() => {
785
+ // Fortschritt basierend auf Einstellungen berechnen
786
+ let increment = 2; // Standard
787
+ if (multipassCheck.checked) increment /= parseInt(multipassCount.value);
788
+ if (resolution > 3200) increment *= 0.5;
789
+
790
+ progress += (Math.random() * increment * 5);
791
  if (progress >= 100) {
792
  progress = 100;
793
  clearInterval(interval);
 
796
 
797
  progressBar.style.width = `${progress}%`;
798
  progressPercent.textContent = `${Math.floor(progress)}%`;
799
+
800
+ // Update Status mit erweiterten Infos
801
+ if (progress < 100) {
802
+ const remainingTime = Math.max(1, Math.round((100 - progress) * estimatedTime / 100));
803
+ statusMessage.textContent = `Scan läuft (${resolution}dpi, ${remainingTime}s verbleibend)...`;
804
+ }
805
  }, 100);
806
 
807
  // Zeige aktive Scan-Parameter
808
+ updateScanInfo();
 
 
 
809
  });
810
 
811
  previewBtn.addEventListener('click', async () => {
 
814
  scannerLight.classList.add('scanner-active');
815
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
816
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
817
+ const resolution = resolutionSelect.value;
818
 
819
+ statusMessage.textContent = `Erstelle Vorschau (${resolution}dpi, ${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})...`;
820
 
821
  // Simuliere eine kurze Vorschau
822
  setTimeout(() => {
823
  placeSampleImage();
824
  scannerLight.classList.remove('scanner-active');
825
+ statusMessage.textContent = `Vorschau erfolgreich erstellt (${resolution}dpi)`;
826
+ updateScanInfo();
827
  }, 800);
828
+
829
+ // Zeige ROI im Expertenmodus an
830
+ if (isExpertMode && roiRectangle) {
831
+ updateRoiRectangle();
832
+ }
833
  });
834
 
835
+ // Slider Event Listener
836
  brightnessSlider.addEventListener('input', () => {
837
  brightnessValue.textContent = brightnessSlider.value;
838
  applyImageAdjustments();
 
863
  applyImageAdjustments();
864
  });
865
 
866
+ densitySlider.addEventListener('input', () => {
867
+ densityValue.textContent = densitySlider.value;
868
+ applyImageAdjustments();
869
+ });
870
+
871
+ shadowSlider.addEventListener('input', () => {
872
+ shadowValue.textContent = shadowSlider.value;
873
+ applyImageAdjustments();
874
+ });
875
+
876
  resetSettingsBtn.addEventListener('click', () => {
877
+ // Basiseinstellungen zurücksetzen
878
  brightnessSlider.value = 100;
879
  contrastSlider.value = 100;
880
  sharpnessSlider.value = 50;
 
889
  saturationValue.textContent = '0';
890
  gradationValue.textContent = '0';
891
 
892
+ // Experteneinstellungen zurücksetzen
893
+ if (isExpertMode) {
894
+ densitySlider.value = 50;
895
+ shadowSlider.value = 0;
896
+
897
+ densityValue.textContent = '50';
898
+ shadowValue.textContent = '0';
899
+
900
+ resolutionSelect.value = '3200';
901
+ outputSizeMode.value = 'original';
902
+ outputSizeValue.value = '100';
903
+ outputSizeLabel.textContent = '(Original)';
904
+ outputSizeValue.disabled = true;
905
+ outputSizeUnit.classList.add('hidden');
906
+
907
+ colorspaceSelect.value = 'srgb';
908
+ multipassCheck.checked = false;
909
+ multipassControls.classList.add('hidden');
910
+ roiX.value = '0';
911
+ roiY.value = '0';
912
+ roiWidth.value = '100';
913
+ roiHeight.value = '100';
914
+ darkCurrentComp.value = 'auto';
915
+ histogramChannel.value = 'rgb';
916
+
917
+ updateRoiRectangle();
918
+ }
919
+
920
  applyImageAdjustments();
921
  });
922
 
 
926
  // Simuliere das Speichern eines Bildes mit aktuellen Einstellungen
927
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
928
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
929
+ const resolution = resolutionSelect.value + 'dpi';
930
+ const filenamePrefix = isExpertMode ? 'scan_expert' : 'scan_standard';
931
+
932
+ const fileName = `${filenamePrefix}_${new Date().toISOString().slice(0, 10)}_${resolution}_${transMode.replace(/\s+/g, '')}_${filmSim !== 'Keine' ? filmSim.replace(/\s+/g, '') : 'Standard'}.tif`;
933
 
934
  statusMessage.textContent = `Bild gespeichert als ${fileName}`;
935
 
936
  // In der echten App würden wir hier eine Speicherdatei-Dialogbox öffnen
937
+ alert(`Bild wurde gespeichert als:\n${fileName}\n\nEinstellungen:\n- Auflösung: ${resolution}\n- Film: ${filmSim}\n- Modus: ${transMode}\n- Farbraum: ${colorspaceSelect.options[colorspaceSelect.selectedIndex].text}`);
938
  });
939
 
940
  standardModeBtn.addEventListener('click', () => {
941
  isExpertMode = false;
942
+ document.body.classList.remove('expert-mode');
943
+ scannerPanel.classList.remove('expert-border');
944
  standardModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
945
  standardModeBtn.classList.replace('text-gray-700', 'text-white');
946
  expertModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
947
  expertModeBtn.classList.replace('text-white', 'text-gray-700');
948
  modeDescription.textContent = "Standardmodus mit vereinfachten Einstellungen";
949
 
950
+ // Verstecke ROIs
951
+ if (roiRectangle) roiRectangle.classList.add('hidden');
 
 
 
 
 
 
 
952
 
953
+ updateScanInfo();
 
 
 
 
 
 
 
954
  });
955
 
956
  expertModeBtn.addEventListener('click', () => {
957
  isExpertMode = true;
958
+ document.body.classList.add('expert-mode');
959
+ scannerPanel.classList.add('expert-border');
960
  expertModeBtn.classList.replace('bg-gray-200', 'bg-imacon');
961
  expertModeBtn.classList.replace('text-gray-700', 'text-white');
962
  standardModeBtn.classList.replace('bg-imacon', 'bg-gray-200');
963
  standardModeBtn.classList.replace('text-white', 'text-gray-700');
964
  modeDescription.textContent = "Expertenmodus mit Vollzugriff auf alle Einstellungen";
965
+
966
+ // Zeige ROI im Expertenmodus an
967
+ updateRoiRectangle();
968
+
969
+ updateScanInfo();
970
  });
971
 
972
  developerModeBtn.addEventListener('click', () => {
973
+ isHardwareMode = !isHardwareMode;
974
+
975
+ if (isHardwareMode) {
976
+ developerModeBtn.classList.replace('bg-red-200', 'bg-green-200');
977
+ developerModeBtn.classList.replace('text-red-800', 'text-green-800');
978
+ developerModeBtn.innerHTML = '<i class="fas fa-plug mr-1"></i> Verbunden';
979
+ statusMessage.textContent = "Hardware-Modus aktiviert - suche nach echten Geräten...";
980
+
981
+ // Simuliere den Wechsel zum echten Hardware-Modus
982
+ setTimeout(() => {
983
+ discoverRealDevices();
984
+ }, 1000);
985
+ } else {
986
+ developerModeBtn.classList.replace('bg-green-200', 'bg-red-200');
987
+ developerModeBtn.classList.replace('text-green-800', 'text-red-800');
988
+ developerModeBtn.innerHTML = '<i class="fas fa-plug mr-1"></i> Hardware-Modus';
989
+ statusMessage.textContent = "Zurück zur Simulationsumgebung";
990
+
991
+ discoverScanners();
992
+ }
993
  });
994
 
995
  infoBtn.addEventListener('click', () => {
996
+ alert('Imacon Flextight X5 Scanner Control\n\nDiese Anwendung simuliert die Steuerung eines hochwertigen Filmscanners.\n\nIm Hardware-Modus wird versucht, mit tatsächlich angeschlossenen Scannern zu kommunizieren.');
997
+ });
998
+
999
+ // Expertenmodus-spezifische Event Listener
1000
+ outputSizeMode.addEventListener('change', () => {
1001
+ updateOutputSizeControls();
1002
+ });
1003
+
1004
+ outputSizeValue.addEventListener('change', () => {
1005
+ updateOutputSizeLabel();
1006
+ });
1007
+
1008
+ outputSizeUnit.addEventListener('change', () => {
1009
+ updateOutputSizeLabel();
1010
+ });
1011
+
1012
+ multipassCheck.addEventListener('change', () => {
1013
+ multipassControls.classList.toggle('hidden', !multipassCheck.checked);
1014
+ });
1015
+
1016
+ // ROI-Änderungen
1017
+ [roiX, roiY, roiWidth, roiHeight].forEach(input => {
1018
+ input.addEventListener('change', () => {
1019
+ updateRoiRectangle();
1020
+ });
1021
+ });
1022
+
1023
+ histogramChannel.addEventListener('change', () => {
1024
+ updateHistogram();
1025
  });
1026
 
1027
  // Hilfsfunktionen
1028
+ function updateOutputSizeControls() {
1029
+ const mode = outputSizeMode.value;
1030
+ outputSizeValue.disabled = mode === 'original';
1031
+ outputSizeUnit.classList.toggle('hidden', mode !== 'fixed-width' && mode !== 'fixed-height');
1032
+
1033
+ if (mode === 'percentage') {
1034
+ outputSizeValue.min = '1';
1035
+ outputSizeValue.max = '500';
1036
+ outputSizeValue.value = '100';
1037
+ } else if (mode === 'fixed-width' || mode === 'fixed-height') {
1038
+ outputSizeValue.min = '1';
1039
+ outputSizeValue.max = '10000';
1040
+ outputSizeValue.value = mode === 'fixed-width' ? '2400' : '3200';
1041
+ }
1042
+
1043
+ updateOutputSizeLabel();
1044
+ }
1045
+
1046
+ function updateOutputSizeLabel() {
1047
+ const mode = outputSizeMode.value;
1048
+ if (mode === 'original') {
1049
+ outputSizeLabel.textContent = '(Original)';
1050
+ } else if (mode === 'percentage') {
1051
+ outputSizeLabel.textContent = `(${outputSizeValue.value}%)`;
1052
+ } else {
1053
+ outputSizeLabel.textContent = `(${outputSizeValue.value}${outputSizeUnit.value})`;
1054
+ }
1055
+ }
1056
+
1057
+ function updateRoiRectangle() {
1058
+ if (!isExpertMode || !roiRectangle) return;
1059
+
1060
+ const container = previewContainer.getBoundingClientRect();
1061
+ const x = (roiX.value / 100) * container.width;
1062
+ const y = (roiY.value / 100) * container.height;
1063
+ const width = (roiWidth.value / 100) * container.width;
1064
+ const height = (roiHeight.value / 100) * container.height;
1065
+
1066
+ roiRectangle.style.left = `${x}px`;
1067
+ roiRectangle.style.top = `${y}px`;
1068
+ roiRectangle.style.width = `${width}px`;
1069
+ roiRectangle.style.height = `${height}px`;
1070
+
1071
+ roiRectangle.classList.remove('hidden');
1072
+ }
1073
+
1074
  function completeScan() {
1075
  isScanning = false;
1076
  scannerLight.classList.remove('scanner-active');
1077
+ updateScanButtons(false);
1078
 
1079
  // Setze das Beispielbild
1080
  placeSampleImage();
 
1082
  // Update Scan-Informationen
1083
  updateScanInfo();
1084
 
1085
+ const resolution = resolutionSelect.value;
1086
  const transMode = transparencyMode.options[transparencyMode.selectedIndex].text;
1087
  const filmSim = filmSimulation.options[filmSimulation.selectedIndex].text;
1088
 
1089
+ statusMessage.textContent = `Scan abgeschlossen (${resolution}dpi, ${transMode} ${filmSim !== 'Keine' ? 'mit '+filmSim : ''})`;
1090
  }
1091
 
1092
  function placeSampleImage() {
 
1117
 
1118
  // Setze das entsprechende Bild
1119
  previewImage.src = imageUrl;
1120
+ previewImage.onload = function() {
1121
+ updateRoiRectangle();
1122
+ };
1123
  previewImage.classList.remove('hidden');
1124
  placeholderText.classList.add('hidden');
1125
  saveImageBtn.disabled = false;
 
1130
 
1131
  function updateHistogram() {
1132
  // In einer echten App würden wir hier ein echtes Histogramm berechnen
1133
+ const channel = histogramChannel.value;
1134
+ let histogramHTML = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1135
 
1136
+ if (channel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1137
  </html>
prompts.txt CHANGED
@@ -1 +1,3 @@
1
- stelle die Seite wieder her um die Funktionen live zu schalten, ergänze die Filmsimulationen um 10 gängige Filme
 
 
 
1
+ stelle die Seite wieder her um die Funktionen live zu schalten, ergänze die Filmsimulationen um 10 gängige Filme
2
+ beende die Simulation und suche nach echten angeschlossenen Scannern, debugge den Expertenmodus und füge ihm weitere Funktionen hinzu wie Auflösung, Ausgabegröße,...
3
+ beende die Simulation und suche nach echten angeschlossenen Scannern, debugge den Expertenmodus und füge ihm weitere Funktionen hinzu wie Auflösung, Ausgabegröße,...