资源简介
java版网页图片编辑器,目前java的很少,自己做了个,
代码片段和文件信息
package com;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ImageDeal extends HttpServlet {
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
this.doPost(request response);
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html“);
response.setCharacterEncoding(“utf-8“);
PrintWriter out = response.getWriter();
float imageH = Float.parseFloat((request.getParameter(“imageH“)));
float imageW = Float.parseFloat((request.getParameter(“imageW“)));
float angle1 = Float.parseFloat((request.getParameter(“imageRotate“)));
String img_source = request.getParameter(“imageSource“);
float imageX = Float.parseFloat((request.getParameter(“imageX“)));
float imageY = Float.parseFloat((request.getParameter(“imageY“)));
float selectorH = Float.parseFloat((request.getParameter(“selectorH“)));
float selectorW = Float.parseFloat((request.getParameter(“selectorW“)));
float selectorX = Float.parseFloat((request.getParameter(“selectorX“)));
float selectorY = Float.parseFloat((request.getParameter(“selectorY“)));
float viewPortH = Float.parseFloat((request.getParameter(“viewPortH“)));
float viewPortW = Float.parseFloat((request.getParameter(“viewPortW“)));
// int x = new Double(request.getParameter(“x“)).intValue();
// int y = new Double(request.getParameter(“y“)).intValue();
// int w = new Double(request.getParameter(“w“)).intValue();
// int h = new Double(request.getParameter(“h“)).intValue();
int x = (int)selectorX;
int y = (int)selectorY;
int w = (int)viewPortW;
int h = (int)viewPortH;
//int scale = Math.round(new Float(request.getParameter(“scale“)).floatValue());
//String _angle = (String)(request.getParameter(“angle“) == null ? 0 : requ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 417 2010-08-18 12:15 ZoomImageDemo\.classpath
文件 313 2010-08-18 16:26 ZoomImageDemo\.myme
文件 1231 2010-08-18 11:35 ZoomImageDemo\.project
文件 1040 2010-08-18 16:26 ZoomImageDemo\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 145 2010-08-19 14:38 ZoomImageDemo\.settings\org.eclipse.core.resources.prefs
文件 330 2010-08-18 16:26 ZoomImageDemo\.settings\org.eclipse.jdt.core.prefs
文件 3726 2010-08-19 14:24 ZoomImageDemo\src\com\ImageDeal.java
文件 6178 2010-08-19 15:02 ZoomImageDemo\src\com\OperateImage.java
文件 1897 2010-08-19 09:31 ZoomImageDemo\src\com\servlet\UpLoadUserHeadImage.java
文件 2199 2010-08-18 12:17 ZoomImageDemo\src\com\servlet\ZoomImage.java
文件 3128 2010-08-19 16:24 ZoomImageDemo\src\com\servlet\ZoomImage_jquery.java
文件 4716 2010-08-19 10:49 ZoomImageDemo\src\com\teetaa\util\ImageHepler.java
文件 5888 2010-08-19 10:35 ZoomImageDemo\src\com\teetaa\util\TestMain.java
文件 5828 2010-08-18 14:10 ZoomImageDemo\WebRoot\Copy of uploadimage.jsp
文件 27467 2010-08-19 11:14 ZoomImageDemo\WebRoot\css\jquery-ui-1.7.2.custom.css
文件 1569 2010-08-18 16:41 ZoomImageDemo\WebRoot\css\main.css
文件 794 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\bg_120.gif
文件 7281 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\blank.jpg
文件 258 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\c.gif
文件 587 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\grip.gif
文件 258 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\h.gif
文件 1617 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\man.GIF
..A.SH. 14336 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\Thumbs.db
文件 571 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\track.gif
文件 699392 2010-08-19 11:17 ZoomImageDemo\WebRoot\image\xray-linux.jpg
文件 255 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\_c.gif
文件 255 2010-08-18 11:32 ZoomImageDemo\WebRoot\image\_h.gif
文件 1923 2010-08-18 15:30 ZoomImageDemo\WebRoot\index.html
文件 3202 2010-08-19 14:33 ZoomImageDemo\WebRoot\jQuerycropZoom.html
文件 9019 2010-08-19 09:17 ZoomImageDemo\WebRoot\js\CutPic.js
............此处省略50个文件信息
评论
共有 条评论