UnSinnlos commited on
Commit
2f8ce9c
·
verified ·
1 Parent(s): 033b9db

jetzt klappt noch nicht einmal mehr das reinladen des bildes !!

Browse files
Files changed (1) hide show
  1. index.html +7 -16
index.html CHANGED
@@ -223,9 +223,8 @@
223
  color: 0x4f46e5,
224
  backgroundColor: 0xf8fafc,
225
  size: 0.7
226
- });
227
-
228
- // Initialize Feather Icons
229
  document.addEventListener('DOMContentLoaded', function() {
230
  feather.replace();
231
 
@@ -389,13 +388,6 @@
389
  data[i + 1] = 255 - avg;
390
  data[i + 2] = 255 - avg;
391
  }
392
- // Apply blur effect based on slider
393
- const blurAmount = document.getElementById('blur-slider').value;
394
- if (blurAmount > 0) {
395
- ctx.filter = `blur(${blurAmount}px)`;
396
- ctx.drawImage(canvas, 0, 0);
397
- ctx.filter = 'none';
398
- }
399
  // Apply blur effect based on slider
400
  const blurAmount = document.getElementById('blur-slider').value;
401
  if (blurAmount > 0) {
@@ -403,17 +395,16 @@
403
  ctx.drawImage(canvas, 0, 0);
404
  ctx.filter = 'none';
405
  }
406
- ctx.putImageData(imageData, 0, 0);
407
-
408
- // Show results
409
  originalDisplay.src = imagePreview.src;
410
  resultDisplay.src = canvas.toDataURL('image/png');
411
  resultsSection.classList.remove('hidden');
412
  };
413
-
414
  img.src = imagePreview.src;
415
- // Reset button
416
- this.innerHTML = '<i data-feather="zap" class="w-5 h-5 mr-2"></i> Generate Sketch';
 
417
  feather.replace();
418
 
419
  // Scroll to results
 
223
  color: 0x4f46e5,
224
  backgroundColor: 0xf8fafc,
225
  size: 0.7
226
+ });
227
+ // Initialize Feather Icons
 
228
  document.addEventListener('DOMContentLoaded', function() {
229
  feather.replace();
230
 
 
388
  data[i + 1] = 255 - avg;
389
  data[i + 2] = 255 - avg;
390
  }
 
 
 
 
 
 
 
391
  // Apply blur effect based on slider
392
  const blurAmount = document.getElementById('blur-slider').value;
393
  if (blurAmount > 0) {
 
395
  ctx.drawImage(canvas, 0, 0);
396
  ctx.filter = 'none';
397
  }
398
+ ctx.putImageData(imageData, 0, 0);
399
+ // Show results
 
400
  originalDisplay.src = imagePreview.src;
401
  resultDisplay.src = canvas.toDataURL('image/png');
402
  resultsSection.classList.remove('hidden');
403
  };
 
404
  img.src = imagePreview.src;
405
+
406
+ // Reset button
407
+ this.innerHTML = '<i data-feather="zap" class="w-5 h-5 mr-2"></i> Generate Sketch';
408
  feather.replace();
409
 
410
  // Scroll to results