This commit is contained in:
parent
8f93409a79
commit
86a32dbb40
1 changed files with 5 additions and 5 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue