Tag: 马赛克

如何在Java中Stich to Image对象

我有一个场景,我从我的地图服务器获得了一些瓷砖(例如12)。 现在对于缓冲和离线function,我需要再次将它们连接起来,这样我们就必须处理1个单个图像对象而不是12个。我试过没有JAI,我的代码在下面。 package imagemerge; import java.awt.*; import java.awt.image.*; import java.awt.event.*; public class ImageSticher extends WindowAdapter { Image tile1; Image tile2; Image result; ColorModel colorModel; int width,height,widthr,heightr; //int t1,t2; int t12[]; public ImageSticher() { } public ImageSticher (Image img1,Image img2,int w,int h) { tile1=img1; tile2=img2; width=w; height=h; colorModel=ColorModel.getRGBdefault(); } public Image horizontalStich() throws Exception { widthr=width*2; […]