public abstract class AbstractImageService extends Object implements JahiaImageService
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractImageService.ResizeCoords |
JahiaImageService.ResizeType| Constructor and Description |
|---|
AbstractImageService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createThumb(Image iw,
File outputFile,
int size,
boolean square)
Creates an image thumbnail and stores it in a specified file
|
AbstractImageService.ResizeCoords |
getResizeCoords(JahiaImageService.ResizeType resizeType,
int sourceWidth,
int sourceHeight,
int targetWidth,
int targetHeight) |
boolean |
resizeImage(Image i,
File outputFile,
int width,
int height)
Resize an image using an ADJUST_SIZE resize type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcropImage, getHeight, getImage, getWidth, resizeImage, resizeImage, rotateImage, rotateImagepublic AbstractImageService.ResizeCoords getResizeCoords(JahiaImageService.ResizeType resizeType, int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
public boolean createThumb(Image iw, File outputFile, int size, boolean square) throws IOException
JahiaImageServicecreateThumb in interface JahiaImageServiceiw - the image for which to generate a thumbnail, this image is loaded through the
getImage methodoutputFile - the file in which to store the generated thumbnailsize - the size in pixels of the generated thumbnail. Usually this will mean the desired
width or height of the image, except if the square option is specified.square - if false, a ResizeType.ADJUST_SIZE resize will be performed, otherwise if
square is true, a ResizeType.ASPECT_FILL will be performed. For more information about these
resize types, see the resize method.IOExceptionpublic boolean resizeImage(Image i, File outputFile, int width, int height) throws IOException
JahiaImageServiceresizeImage in interface JahiaImageServicei - the image to resizeoutputFile - the output file where to output the resized imagewidth - the desired image widthheight - the desired image heightIOExceptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.