0

How to set input image size on java?

How to set input image size on java?

24th Jan 2020, 9:03 AM
劉厚均
劉厚均 - avatar
2 Respostas
0
ImageIcon icon = new ImageIcon(UrlToPngFile); Image scaleImage = icon.getImage().getScaledInstance(28, 28,Image.SCALE_DEFAULT);
24th Jan 2020, 6:05 PM
Robert Jolliffe
Robert Jolliffe - avatar
0
Image newImage = yourImage.getScaledInstance(newWidth, newHeight, Image.SCALE_DEFAULT);
24th Jan 2020, 6:07 PM
Robert Jolliffe
Robert Jolliffe - avatar