Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将图像添加到特定位置的另一个图像,它可以是像素或厘米或(x,y)。我必须通过使用 JAI(Java Advanced Imaging)的 Java 编程来完成。 我用谷歌搜索获取示例代码。 我得到了替换,只在最后添加。但不是在特定位置。 任何想法都是值得赞赏的。 拉克斯曼杂烩
BufferedImage sourceImage = ImageIO.read("myImage"); BufferedImage overlayImage = ImageIO.read("myOverlay"); Graphics2D g2Source = sourceImage.createGraphics(); g2Source.drawImage(overlayImage, x, y, null); g2Source.dispose();