public class ImageManipulation
extends javax.servlet.http.HttpServlet
After the image is manipulated, it is then sent back as an image/type object to the calling parent, most often a browser or an HTML img tag.
| Constructor and Description |
|---|
ImageManipulation() |
| Modifier and Type | Method and Description |
|---|---|
ij.process.ImageProcessor |
crop(ij.process.ImageProcessor ip,
java.lang.String cropX,
java.lang.String cropY,
java.lang.String cropWidth,
java.lang.String cropHeight)
Crops an image with supplied starting point and ending point.
|
void |
destroy() |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Method automatically called by browser to handle image manipulations.
|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletreq - Browser request to servlet res Response sent back to browser after
image manipulationjava.io.IOException - If an input or output exception occurred ServletException If a
servlet exception occurredjavax.servlet.ServletExceptionpublic ij.process.ImageProcessor crop(ij.process.ImageProcessor ip,
java.lang.String cropX,
java.lang.String cropY,
java.lang.String cropWidth,
java.lang.String cropHeight)
ip - The image to crop cropX The starting x position; x=0 corresponds
to left side of image cropY The starting y position; y=0
corresponds to top of image cropWidth The width of the crop,
starting from the above x cropHeight The height of the crop,
starting from the above yCopyright © 2014 DuraSpace. All Rights Reserved.