我弄了一个图片加水印的代码 已经测试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); }
元芳怎么了
相关分类