From ce9a4d82c0544e795cd5c7c7a47a1573d8f46641 Mon Sep 17 00:00:00 2001 From: ulrich <not disclosed> Date: Mon, 15 Jan 2018 17:27:13 +0000 Subject: [PATCH] readme ergaenzt --- src/bilder.groovy | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/bilder.groovy b/src/bilder.groovy index 03737da..00ce2a1 100644 --- a/src/bilder.groovy +++ b/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"); -- Gitblit v1.9.3