inputStream = new FileInputStream(img);
memoryStream = ImageUtils.createMemoryStream(inputStream);
if (ImageUtils.isGIF(memoryStream)) {
suffix = ".gif";
}
DrawTextParameter dtp = createDrawTextParameter("阿里巴巴测试", true, true);
inputToStore = ((ByteArrayOutputStream) processor.process(memoryStream, dtp, DEFAULT_SCALE_PARAM.getMaxWidth(), DEFAULT_SCALE_PARAM.getMaxHeight())).toInputStream();
String outputName = img.getName().substring(0, img.getName().indexOf("."));
outputFile = new File(rpath, "COMPOSITETEST_" + outputName + suffix);
outputStream = new FileOutputStream(outputFile);
IOUtils.copy(inputToStore, outputStream);