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 an image to given dimensions.
- Specified by:
resizeImage in interface ResizeImageService
- Parameters:
imageName - 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.
- Returns:
- The resized image.
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImage(String, InputStream, int, int, boolean)
resizeImageByWidth
public InputStream resizeImageByWidth(String imageName,
InputStream is,
int requestWidth)
throws FileNotSupportedException
- Resizes an image to a given width.
- Specified by:
resizeImageByWidth in interface ResizeImageService
- Parameters:
imageName - Name of the image to be resized.is - The input image.requestWidth - New width of the image.
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImageByWidth(String, InputStream, int)
resizeImageByHeight
public InputStream resizeImageByHeight(String imageName,
InputStream is,
int requestHeight)
throws FileNotSupportedException
- Resizes an image to a given height.
- Specified by:
resizeImageByHeight in interface ResizeImageService
- Parameters:
imageName - Name of the image to be resized.is - The input image.requestHeight - New height of the image.
- Returns:
- The resized image.
- Throws:
FileNotSupportedException- See Also:
ResizeImageService.resizeImageByHeight(String, InputStream, int)
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.