我弄了一個圖片加水印的代碼 已經(jīng)測試OK了 但是在servlet中調(diào)用卻生成不了加水印后的圖片 沒有報錯 為什么這是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);
}
添加回答
舉報
0/150
提交
取消