public class ResizeImageServiceImpl extends Object implements ResizeImageService
| Constructor and Description |
|---|
ResizeImageServiceImpl(org.exoplatform.services.cache.CacheService caService) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
resizeImage(String imageName,
InputStream is,
int requestWidth,
int requestHeight,
boolean keepAspectRatio)
Resizes an image to given dimensions.
|
InputStream |
resizeImageByHeight(String imageName,
InputStream is,
int requestHeight)
Resizes an image to a given height.
|
InputStream |
resizeImageByWidth(String imageName,
InputStream is,
int requestWidth)
Resizes an image to a given width.
|
public ResizeImageServiceImpl(org.exoplatform.services.cache.CacheService caService)
public InputStream resizeImage(String imageName, InputStream is, int requestWidth, int requestHeight, boolean keepAspectRatio) throws FileNotSupportedException
resizeImage in interface ResizeImageServiceimageName - Name of the resized image.is - The input image.requestWidth - New width of the image.requestHeight - New height of the image.keepAspectRatio - The image's aspect ratio is kept or not.FileNotSupportedExceptionResizeImageService.resizeImage(String, InputStream, int, int, boolean)public InputStream resizeImageByWidth(String imageName, InputStream is, int requestWidth) throws FileNotSupportedException
resizeImageByWidth in interface ResizeImageServiceimageName - Name of the image to be resized.is - The input image.requestWidth - New width of the image.FileNotSupportedExceptionResizeImageService.resizeImageByWidth(String, InputStream, int)public InputStream resizeImageByHeight(String imageName, InputStream is, int requestHeight) throws FileNotSupportedException
resizeImageByHeight in interface ResizeImageServiceimageName - Name of the image to be resized.is - The input image.requestHeight - New height of the image.FileNotSupportedExceptionResizeImageService.resizeImageByHeight(String, InputStream, int)Copyright © 2003–2015 eXo Platform SAS. All rights reserved.