From 74fab1c53fd3850bf0fd075c93622f14ad8dbe30 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 06 Jan 2021 23:03:51 +0000
Subject: [PATCH] null pruefung hinzugefuegt

---
 src/java/de/uhilger/filecms/api/HtmlExportService.java |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/java/de/uhilger/filecms/api/HtmlExportService.java b/src/java/de/uhilger/filecms/api/HtmlExportService.java
index 8368466..9dbee4a 100644
--- a/src/java/de/uhilger/filecms/api/HtmlExportService.java
+++ b/src/java/de/uhilger/filecms/api/HtmlExportService.java
@@ -20,11 +20,7 @@
 
 package de.uhilger.filecms.api;
 
-import de.uhilger.filecms.data.Bild;
-import java.awt.Container;
-import java.awt.Image;
-import java.awt.MediaTracker;
-import java.awt.Toolkit;
+import de.uhilger.wbx.Bild;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileFilter;
@@ -34,6 +30,7 @@
 import java.io.PrintWriter;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import net.coobird.thumbnailator.Thumbnails;
 import org.apache.commons.io.FileUtils;
 
 /**
@@ -190,6 +187,17 @@
           }
           String outFileName = new File(dir, tnFileName.toString()).getAbsolutePath();
           logger.fine("outFileName: " + outFileName);
+          
+        try {
+          Thumbnails.of(absPath)
+                  .size(bild.getVariantenGroesse(Bild.WINZIG), bild.getVariantenGroesse(Bild.WINZIG))
+                  .keepAspectRatio(true)
+                  .outputQuality(0.7)
+                  .toFile(outFileName);
+        } catch (IOException ex) {
+          logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
+        }
+          /*
           Image image = Toolkit.getDefaultToolkit().getImage(absPath);
           MediaTracker mediaTracker = new MediaTracker(new Container());
           mediaTracker.addImage(image, 0);
@@ -203,7 +211,8 @@
             }
           } catch (InterruptedException | IOException ex) {
             logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);
-          }      
+          } 
+          */
         }
       }
     } else {

--
Gitblit v1.9.3