Commit 09a7efde authored by 夏彬's avatar 夏彬

修改java处理ppt服务

parent d5bb88e0
......@@ -95,6 +95,9 @@ public class PptToImages {
} catch (FileNotFoundException e) {
System.out.println(e);
} catch (IOException e) {
System.out.println(e);
} catch (Exception e) {
System.out.println(e);
}
return false;
}
......@@ -131,17 +134,17 @@ public class PptToImages {
hslfSlide.draw(graphics);
// 这里设置图片的存放路径和图片的格式(jpeg,png,bmp等等),注意生成文件路径
FileOutputStream out = new FileOutputStream(outPut + "image_" + (i + 1) + ".jpg");
FileOutputStream out = new FileOutputStream(outPut + "/image_" + (i + 1) + ".jpg");
javax.imageio.ImageIO.write(img, "jpg", out);
out.close();
break;
}
return true;
} catch (FileNotFoundException e) {
System.out.println(e);
// System.out.println("Can't find the image!");
} catch (IOException e) {
System.out.println(e);
} catch (Exception e) {
System.out.println(e);
}
return false;
}
......
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