com.atlassian.core.util.thumbnail
Class ThumbnailRenderer

java.lang.Object
  extended by com.atlassian.core.util.thumbnail.ThumbnailRenderer

public class ThumbnailRenderer
extends Object


Constructor Summary
ThumbnailRenderer(ImageScaler rasterScaler, ImageScaler streamScaler, DimensionsHelper dimensionsHelper, com.google.common.base.Predicate<Dimensions> rasterBasedRenderingThreshold)
           
 
Method Summary
 BufferedImage createThumbnailImage(InputStream inputStream, int maxWidth, int maxHeight)
          Create a BufferedImage from the input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThumbnailRenderer

public ThumbnailRenderer(ImageScaler rasterScaler,
                         ImageScaler streamScaler,
                         DimensionsHelper dimensionsHelper,
                         com.google.common.base.Predicate<Dimensions> rasterBasedRenderingThreshold)
Method Detail

createThumbnailImage

public BufferedImage createThumbnailImage(InputStream inputStream,
                                          int maxWidth,
                                          int maxHeight)
Create a BufferedImage from the input stream.

Parameters:
inputStream - - The stream that contains the image data
maxWidth - - The maximum width of the thumbnail - this renderer maintains the aspect ratio of the original image
maxHeight - - The maximum height of the thumbnail - this renderer maintains the aspect ratio of the original image
Returns:
BufferedImage that is at most maxWidthxmaxHeight, never returns null


Copyright © 2015 Atlassian. All rights reserved.