From f23fb96ae366c04980f3fe408dc1443109b07560 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 19 Oct 2009 15:47:16 +0000
Subject: [PATCH] LMS-1231 Javadoc added

SVN: 13004
---
 .../dss/generic/shared/utils/ImageUtil.java        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/ImageUtil.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/ImageUtil.java
index a491a5b1710..4fa7efc77d2 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/ImageUtil.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/utils/ImageUtil.java
@@ -25,12 +25,18 @@ import javax.media.jai.JAI;
 import javax.media.jai.PlanarImage;
 
 /**
- * 
+ * Utility function on images.
  *
  * @author Franz-Josef Elmer
  */
 public class ImageUtil
 {
+    /**
+     * Loads an image from specified file. Supported file formats are GIF, JPG, PNG, and TIFF.
+     * 
+     * @throws IllegalArgumentException if either the file does not exist or it isn't a valid image
+     *             file.
+     */
     public static BufferedImage loadImage(File file)
     {
         if (file.exists() == false)
@@ -47,6 +53,12 @@ public class ImageUtil
         }
     }
     
+    /**
+     * Creates a thumbnail from the specified image by preserving the aspect ratio.
+     * 
+     * @param maxWidth Maximum width of the thumbnail.
+     * @param maxHeight Maximum height of the thumbnail.
+     */
     public static BufferedImage createThumbnail(BufferedImage image, int maxWidth, int maxHeight)
     {
         int width = image.getWidth();
-- 
GitLab