GraphicsMagick+im4java

请好心的各位叔叔阿姨,兄弟姐妹们帮帮忙,解决一哈这个问题。

红色标注的gravity,有哪些gravity type?比如说center?还有哪些呢?最重要的要是是右下角用哪个来表示呢?

package com.tzit.lhb2c.tool;

import java.io.IOException;

import org.im4java.core.CompositeCmd;
import org.im4java.core.IM4JavaException;
import org.im4java.core.IMOperation;

public class test {

 /**
  * @param args
  */
 public static void initLogoImg(String filePath,String toImg, String logoPath) throws IOException, InterruptedException, IM4JavaException{
  IMOperation op = new IMOperation();
  op.gravity("gravity");
//  op.dissolve(op);
  op.addImage(logoPath);
  op.addImage(filePath);
  op.addImage(toImg);
  CompositeCmd cmd=new CompositeCmd(true);
  cmd.run(op);
  

}
 public static void main(String[] args) throws IOException, InterruptedException, IM4JavaException {
  // TODO Auto-generated method stub
  initLogoImg("c:\\10040072.jpg","c:\\1.jpg","d:\\logo.png");

 }

}

你可能感兴趣的:(GraphicsMagick+im4java)