이미지의 윗부분을 아래쪽으로 이동하여 이미지의 스트립 (폭)을 제거하고 싶습니다. 현재이 작업을 수행하고 있지만 새로운 BufferedImage를 만들지 않고도이 작업을 효율적으로 수행 할 수있는 방법이 있다고 생각합니다.BufferedImage의 스트립을 효율적으로 자르기
코드 조각 : 사전에
BufferedImage myImage = ...;
...
BufferedImage imgPart_1 = myImage.getSubimage(0, 0, myImage.getWidth(), (myImage.getHeight()/2)-50);
BufferedImage imgPart_2 = myImage.getSubimage(0, myImage.getHeight()/2, myImage.getWidth(), myImage.getHeight()/2);
BufferedImage newImage = new BufferedImage(myImage.getWidth(), myImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics g = newImage.createGraphics();
g.drawImage(imgPart_1, 0, 0, null);
g.drawImage(imgPart_2, 0, imgPart_1.getHeight(), null);
myImage = newImage;
...
감사합니다.