This commit is contained in:
Ziver Koc 2010-12-18 00:39:28 +00:00
parent 8f93409a79
commit 86a32dbb40

View file

@ -14,11 +14,11 @@ public class ImageUtil {
/** /**
* Resizes a BufferedImage * Resizes a BufferedImage
* *
* @param source is the image to resize * @param source is the image to resize
* @param width is the wanted width * @param width is the wanted width
* @param height is the wanted height * @param height is the wanted height
* @param keep_aspect is if the aspect ratio of the image should be kept * @param keep_aspect is if the aspect ratio of the image should be kept
* @return the resized image * @return the resized image
*/ */
public static BufferedImage scale(BufferedImage source, int width, int height, boolean keep_aspect){ public static BufferedImage scale(BufferedImage source, int width, int height, boolean keep_aspect){
double scale_width = (double)width / source.getWidth(); double scale_width = (double)width / source.getWidth();