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 a given image to the specified dimensions.
|
InputStream |
resizeImageByHeight(String imageName,
InputStream is,
int requestHeight)
Resizes a given image input stream to adapt with the desired height and keep
the aspect ratio.
|
InputStream |
resizeImageByWidth(String imageName,
InputStream is,
int requestWidth)
Resizes a given image to adapt with the desired width and keep
the aspect ratio.
|
public ResizeImageServiceImpl(org.exoplatform.services.cache.CacheService caService)
public InputStream resizeImage(String imageName, InputStream is, int requestWidth, int requestHeight, boolean keepAspectRatio)
resizeImage in interface ResizeImageServiceimageName - Name of the image to be resized.is - The input stream of the image.requestWidth - The new width.requestHeight - The new height.keepAspectRatio - Keeps the aspect ratio or not.ResizeImageService.resizeImage(String, InputStream, int, int, boolean)public InputStream resizeImageByWidth(String imageName, InputStream is, int requestWidth)
resizeImageByWidth in interface ResizeImageServiceimageName - Name of the image to be resized.is - The input stream of the image.requestWidth - The desired width.ResizeImageService.resizeImageByWidth(String, InputStream, int)public InputStream resizeImageByHeight(String imageName, InputStream is, int requestHeight)
resizeImageByHeight in interface ResizeImageServiceimageName - Name of the resized image.is - The input stream of the image.requestHeight - The desired height.ResizeImageService.resizeImageByHeight(String, InputStream, int)Copyright © 2003–2021 eXo Platform SAS. All rights reserved.