2013-05-07 3 views
-5

Java를 사용하여 .jpg 파일의 크기를 조정하는 방법은 무엇입니까? 예를 들어 이미지의 너비와 높이를 두 배로 늘리고 싶습니다.이미지를 다른 크기로 변환하는 방법

+0

이미지 API를 확인하십시오. 이미지 크기를 조절할 수있는 방법이 있습니다. – camickr

+1

[this] (http://stackoverflow.com/questions/14115950/quality-of-image-after-resize-very-low-java/14116752#14116752) 또는 [this] (http : // 또는 [this] (http : // stackoverflow.com/questions/12876615/how-do-i-resize-images-inside-an-application-when-the-application-window-is-resi/12876799#12876799) .com/questions/11959758/java-keeping-aspect-ratio-of-jpanel-background-image/11959928 # 11959928)을 몇 가지 예제로 사용하고 있습니다 ... – MadProgrammer

답변

1

getScaledInstanceImage에서 사용할 수 있습니다. 자세한 내용은 Documentation

+1

'getScaledInstance '반드시 최선의 선택이 아니므로 [The Perils of Image.getScaledInstance()]를 확인하십시오 (https://today.java.net/pub/a/today/2007/04/03/perils-of-image- getscaledinstance.html) – MadProgrammer

관련 문제