문제

I want to add an image to another image at specific position either it would be pixels or cm or (x,y). I have to do it by java programming using JAI(Java Advanced Imaging).
I googled to get sample code.
I got replacing ,adding at the end only.But not at specific position.
Any idea is appreciatable.
Laxman chowdary

도움이 되었습니까?

해결책

BufferedImage sourceImage = ImageIO.read("myImage");
BufferedImage overlayImage = ImageIO.read("myOverlay");

Graphics2D g2Source = sourceImage.createGraphics();
g2Source.drawImage(overlayImage, x, y, null);

g2Source.dispose();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top