org.exoplatform.wiki.service.image
Interface ResizeImageService

All Known Implementing Classes:
ResizeImageServiceImpl

public interface ResizeImageService

Created by The eXo Platform SAS Author : Lai Trung Hieu hieu.lai@exoplatform.com 2 Jun 2011


Method Summary
 InputStream resizeImage(String imageName, InputStream is, int requestWidth, int requestHeight, boolean keepAspectRatio)
          Resize the given image input stream to the specified dimensions.
 InputStream resizeImageByHeight(String imageName, InputStream is, int requestHeight)
          Resize the given image input stream to the adapt requested height and keep the aspect ratio.
 InputStream resizeImageByWidth(String imageName, InputStream is, int requestWidth)
          Resize the given image input stream to the adapt requested width and keep the aspect ratio.
 

Method Detail

resizeImage

InputStream resizeImage(String imageName,
                        InputStream is,
                        int requestWidth,
                        int requestHeight,
                        boolean keepAspectRatio)
Resize the given image input stream to the specified dimensions.

Parameters:
imageName - is the name of image to be resized
is - is the input stream of image
requestWidth - the new image width
requestHeight - the new image height
keepAspectRatio - keep the aspect ratio or not
Returns:
the resized input stream

resizeImageByWidth

InputStream resizeImageByWidth(String imageName,
                               InputStream is,
                               int requestWidth)
Resize the given image input stream to the adapt requested width and keep the aspect ratio.

Parameters:
imageName - is the name of image to be resized
is - is the input stream of image
requestWidth - the new image width

resizeImageByHeight

InputStream resizeImageByHeight(String imageName,
                                InputStream is,
                                int requestHeight)
Resize the given image input stream to the adapt requested height and keep the aspect ratio.

Parameters:
imageName - is the name of image to be resized
is - is the input stream of image
requestHeight - the new image height
Returns:
the resized input stream


Copyright © 2013 eXo Platform SAS. All Rights Reserved.