如何在imageMagick中使用-flant和-page将一个图像重叠到另一个具有特定偏移值的图像上
我的程序使用imageMagick通过保持纵横比并在实际图像上添加较小的标记图像来调整实际图像的大小 首先,我保持高度为150,宽度为浮动,以保持纵横比,然后我找到需要保持标记指针的相对点 下面是我使用的代码 def originalImageAspectRatio=Integer.parseInt(params.imageWidth)/Integer.parseInt(params.imageHeight) def宽度=150*原始AlimageAspectratio如何在imageMagick中使用-flant和-page将一个图像重叠到另一个具有特定偏移值的图像上,imagemagick,imagemagick-convert,Imagemagick,Imagemagick Convert,我的程序使用imageMagick通过保持纵横比并在实际图像上添加较小的标记图像来调整实际图像的大小 首先,我保持高度为150,宽度为浮动,以保持纵横比,然后我找到需要保持标记指针的相对点 下面是我使用的代码 def originalImageAspectRatio=Integer.parseInt(params.imageWidth)/Integer.parseInt(params.imageHeight) def宽度=150*原始AlimageAspectratio IMOp
IMOperation op = new IMOperation();
op.addImage("-")
op.quality(50)
op.strip();
op.autoOrient();
op.addRawArgs("-resize",width+"x"+150+"^")
op.page(0,0,(int)relativePoint.x,(int)relativePoint.y)
op.addImage(markerIcon)
op.flatten()
op.addImage("jpeg:-")
在这里,我想创建一个缩略图图像,标记指针应该与原始图像相同,以便我找到x和y的相对点
但是图像正在正确调整大小,同时也保持了纵横比,但是标记指针不在我在大图像中添加的同一坐标点上