Interface ResizeImageService
- All Known Implementing Classes:
ResizeImageServiceImpl
public interface ResizeImageService
Resizes the dimension of images. Images can be resized by a specific width or height or both.
-
Method Summary
Modifier and TypeMethodDescriptionresizeImage(String imageName, InputStream is, int requestWidth, int requestHeight, boolean keepAspectRatio) Resizes an image to given dimensions.resizeImageByHeight(String imageName, InputStream is, int requestHeight) Resizes an image to a given height.resizeImageByWidth(String imageName, InputStream is, int requestWidth) Resizes an image to a given width.
-
Method Details
-
resizeImage
InputStream resizeImage(String imageName, InputStream is, int requestWidth, int requestHeight, boolean keepAspectRatio) throws FileNotSupportedException Resizes an image to given dimensions.- 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- eXo level API
- Platform
-
resizeImageByWidth
InputStream resizeImageByWidth(String imageName, InputStream is, int requestWidth) throws FileNotSupportedException Resizes an image to a given width.- Parameters:
imageName- Name of the image to be resized.is- The input image.requestWidth- New width of the image.- Throws:
FileNotSupportedException- eXo level API
- Platform
-
resizeImageByHeight
InputStream resizeImageByHeight(String imageName, InputStream is, int requestHeight) throws FileNotSupportedException Resizes an image to a given height.- 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- eXo level API
- Platform
-