java中 servlet调用图片加水印的代码 没有报错 但是却没有生成图片

我弄了一个图片加水印的代码 已经测试OK了 但是在servlet中调用却生成不了加水印后的图片 没有报错 为什么
这是servlet中的代码

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {    request.setCharacterEncoding("UTF-8");
    String bianlistyle=request.getParameter("bianlistyle");
    String weibo=request.getParameter("weibo");
    String color=request.getParameter("color");
    String s1=color.substring(1,3);
    String s2=color.substring(3,5);
    String s3=color.substring(5,7);
    int color1=Integer.parseInt(s1, 16);
    int color2=Integer.parseInt(s2, 16);
    int color3=Integer.parseInt(s3, 16);
    Color fontcolor=new Color(color1,color2,color3);
    PrintWriter out = response.getWriter();
    out.println(bianlistyle);
    new WaterMark().mark(".//WebRoot//image//1.png",".//WebRoot//image//4.png", weibo,fontcolor);

}


眼眸繁星
浏览 452回答 1
1回答

元芳怎么了

没有生产图片是因为没有把它写到一个地方啊 or File or OutputStream
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java