Commit fb743ae8 authored by ymwang's avatar ymwang

合并成功版本

parent ad1a0789
package com.pitong.business.service.picPro.picImpl;
import com.pitong.business.item.Picture;
import com.pitong.business.service.picPro.IPicProcess;
import java.io.IOException;
import java.util.LinkedList;
import static com.pitong.business.service.saveFile.Save.loadPicture;
import static com.pitong.business.service.saveFile.Save.saveToFile;
public class mergeProcess implements IPicProcess {
public static LinkedList<Picture> picPara = new LinkedList<>();
@Override
public LinkedList<Picture> picProcess(Picture... pictures) {
System.out.println("run Before saveToFile");
saveToFile(pictures[0],in_file1);
saveToFile(pictures[1],in_file2);
System.out.println("run after saveToFile");
try {
String command = "python merge-pro.py " + in_file1 + " " + in_file2 + " " + out_file;
Process process = Runtime.getRuntime().exec(command);
process.waitFor();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
picPara.add(loadPicture(out_file));
return picPara;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment