Verschiedene Groovy Skripte
..
ulrich
2018-01-15 51ca668d316d8b4d284a255ac9b28c112f9f2690
src/bilder.groovy
@@ -127,26 +127,22 @@
          imgType = "jpg";
        }
        //ImageIO.write(thumbImage, imgType, outFile);
            /* 14.1.2018 Beginn */
            //File outfile =new File(“/opt/images/modified.jpg”);
            /*
               14.1.2018: Ausgabe um Qualitaetsparameter erweitert
               Beginn
            */
        ImageWriter writer = ImageIO.getImageWritersByFormatName(imgType).next();
        //ImageWriter writer = iter.next();
        ImageWriteParam iwp = writer.getDefaultWriteParam();
        iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
        iwp.setCompressionQuality(quality);
        writer.setOutput(new FileImageOutputStream(outFile));
        writer.write(null, new IIOImage(thumbImage, null, null),iwp);
        writer.write(null, new IIOImage(thumbImage, null, null), iwp);
        writer.dispose();
            /* 14.1.2018 Ende */
      }
    } catch (InterruptedException ex) {
      System.out.println("Error: " + ex.getLocalizedMessage());
    }
   }
} else {
   System.out.println("fileList is null or empty");