org.exoplatform.forum.common.image.impl
Class ResizeImageServiceImpl
java.lang.Object
org.exoplatform.forum.common.image.impl.ResizeImageServiceImpl
- All Implemented Interfaces:
- ResizeImageService
public class ResizeImageServiceImpl
- extends Object
- implements ResizeImageService
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResizeImageServiceImpl
public ResizeImageServiceImpl(org.exoplatform.services.cache.CacheService caService)
resizeImage
public InputStream resizeImage(String imageName,
InputStream is,
int requestWidth,
int requestHeight,
boolean keepAspectRatio)
throws FileNotSupportedException
- Resizes the given image input stream to the specified dimensions.
- Specified by:
resizeImage in interface ResizeImageService
- Parameters:
imageName - is the name of image to be resizedis - is the input stream of imagerequestWidth - the new image widthrequestHeight - the new image heightkeepAspectRatio - keep the aspect ratio or not
- Returns:
- the resized input stream
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImage(String, InputStream, int, int, boolean)
resizeImageByWidth
public InputStream resizeImageByWidth(String imageName,
InputStream is,
int requestWidth)
throws FileNotSupportedException
- Resizes the given image input stream to the adapt requested width and keep
the aspect ratio.
- Specified by:
resizeImageByWidth in interface ResizeImageService
- Parameters:
imageName - is the name of image to be resizedis - is the input stream of imagerequestWidth - the new image width
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImageByWidth(String, InputStream, int)
resizeImageByHeight
public InputStream resizeImageByHeight(String imageName,
InputStream is,
int requestHeight)
throws FileNotSupportedException
- Resizes the given image input stream to the adapt requested height and keep
the aspect ratio.
- Specified by:
resizeImageByHeight in interface ResizeImageService
- Parameters:
imageName - is the name of image to be resizedis - is the input stream of imagerequestHeight - the new image height
- Returns:
- the resized input stream
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImageByHeight(String, InputStream, int)
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.