Code formatting
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sat, 4 Apr 2020 11:09:03 +0000 (14:09 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sat, 4 Apr 2020 11:09:03 +0000 (14:09 +0300)
src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java

index 6f74473..184bac6 100755 (executable)
@@ -5,7 +5,7 @@
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
  * or later as published by the Free Software Foundation.
-*/
+ */
 
 package eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes;
 
@@ -127,29 +127,29 @@ public class Picture extends AbstractFile {
     private static void makeJpegThumbnail(File inputFile, File outputFile, java.awt.Dimension preferredTargetDimensions)
             throws IOException, ImageFormatError {
 
-            final BufferedImage inputImage = getBufferedImage(inputFile);
+        final BufferedImage inputImage = getBufferedImage(inputFile);
 
-            final java.awt.Dimension sourceImageDimension = new java.awt.Dimension(
-                    inputImage.getWidth(), inputImage.getHeight());
+        final java.awt.Dimension sourceImageDimension = new java.awt.Dimension(
+                inputImage.getWidth(), inputImage.getHeight());
 
-            final java.awt.Dimension targetDimensions = getTargetThumbnailDimension(
-                    sourceImageDimension, preferredTargetDimensions);
+        final java.awt.Dimension targetDimensions = getTargetThumbnailDimension(
+                sourceImageDimension, preferredTargetDimensions);
 
-            final OutputStream out = new FileOutputStream(outputFile);
+        final OutputStream out = new FileOutputStream(outputFile);
 
-            final Image scaledImage = scaleImage(inputImage,
-                    targetDimensions.width, targetDimensions.height);
+        final Image scaledImage = scaleImage(inputImage,
+                targetDimensions.width, targetDimensions.height);
 
-            final BufferedImage bufferedImage = new BufferedImage(
-                    scaledImage.getWidth(null), scaledImage.getHeight(null),
-                    TYPE_INT_RGB);
+        final BufferedImage bufferedImage = new BufferedImage(
+                scaledImage.getWidth(null), scaledImage.getHeight(null),
+                TYPE_INT_RGB);
 
-            final Graphics2D g = bufferedImage.createGraphics();
-            g.drawImage(scaledImage, 0, 0, null);
-            g.dispose();
+        final Graphics2D g = bufferedImage.createGraphics();
+        g.drawImage(scaledImage, 0, 0, null);
+        g.dispose();
 
-            ImageIO.write(bufferedImage, "jpg", out);
-            out.close();
+        ImageIO.write(bufferedImage, "jpg", out);
+        out.close();
     }
 
     private static void makeGifThumbnail(
@@ -166,7 +166,7 @@ public class Picture extends AbstractFile {
 
         System.out.println("Desired target image dimensions:" + targetDimensions);
 
-        FileInputStream fiStream = new FileInputStream( inputFile );
+        FileInputStream fiStream = new FileInputStream(inputFile);
 
         ImageReader reader = ImageIO.getImageReadersByFormatName("gif").next();
         ImageInputStream stream = ImageIO.createImageInputStream(inputFile);
@@ -183,15 +183,15 @@ public class Picture extends AbstractFile {
             frame.image = bimage;
         }
 
-        ImageOutputStream output = new FileImageOutputStream(outputFile );
+        ImageOutputStream output = new FileImageOutputStream(outputFile);
 
         GifSequenceWriter writer =
-                new GifSequenceWriter( output, frames[0].image.getType(), frames[0].getDelay(), true );
+                new GifSequenceWriter(output, frames[0].image.getType(), frames[0].getDelay(), true);
 
-        writer.writeToSequence( frames[0].image );
-        for ( int i = 1; i < frames.length; i++ ) {
+        writer.writeToSequence(frames[0].image);
+        for (int i = 1; i < frames.length; i++) {
             BufferedImage nextImage = frames[i].image;
-            writer.writeToSequence( nextImage );
+            writer.writeToSequence(nextImage);
         }
 
         writer.close();