com.atlassian.confluence.plugins.avatar
Class DefaultImageHelper

java.lang.Object
  extended by com.atlassian.confluence.plugins.avatar.DefaultImageHelper
All Implemented Interfaces:
ImageHelper

public class DefaultImageHelper
extends java.lang.Object
implements ImageHelper


Constructor Summary
DefaultImageHelper()
           
 
Method Summary
 java.io.InputStream autoCropAndResize(java.io.InputStream imageStream)
          Crops the largest centre square in the image provided.
 java.io.InputStream cropAndResize(java.io.InputStream imageStream, int x, int y, int width, int height)
          Returns a crop of the specified area denoted with x and y offets spanning the specified width and height.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImageHelper

public DefaultImageHelper()
Method Detail

autoCropAndResize

public java.io.InputStream autoCropAndResize(java.io.InputStream imageStream)
Description copied from interface: ImageHelper
Crops the largest centre square in the image provided.

Specified by:
autoCropAndResize in interface ImageHelper
Parameters:
imageStream - the stream of the image.
Returns:
a crop representing the largest centre square in the image provided.

cropAndResize

public java.io.InputStream cropAndResize(java.io.InputStream imageStream,
                                         int x,
                                         int y,
                                         int width,
                                         int height)
Description copied from interface: ImageHelper
Returns a crop of the specified area denoted with x and y offets spanning the specified width and height.

Specified by:
cropAndResize in interface ImageHelper
Parameters:
imageStream - the stream of the image
x - the x offset
y - the y offset
width - the width of the crop area
height - the height of the crop area
Returns:
a crop of the specified area denoted with x and y offets spanning the specified width and height.


Copyright © 2003-2014 Atlassian. All Rights Reserved.