org.dspace.app.mediafilter
Class BrandedPreviewJPEGFilter

java.lang.Object
  extended by org.dspace.app.mediafilter.MediaFilter
      extended by org.dspace.app.mediafilter.BrandedPreviewJPEGFilter
All Implemented Interfaces:
FormatFilter

public class BrandedPreviewJPEGFilter
extends MediaFilter

Filter image bitstreams, scaling the image to be within the bounds of thumbnail.maxwidth, thumbnail.maxheight, the size we want our thumbnail to be no bigger than. Creates only JPEGs.


Constructor Summary
BrandedPreviewJPEGFilter()
           
 
Method Summary
 String getBundleName()
           
 String getDescription()
           
 InputStream getDestinationStream(InputStream source)
           
 String getFilteredName(String oldFilename)
          Get a filename for a newly created filtered bitstream
 String getFormatString()
           
 
Methods inherited from class org.dspace.app.mediafilter.MediaFilter
postProcessBitstream, preProcessBitstream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrandedPreviewJPEGFilter

public BrandedPreviewJPEGFilter()
Method Detail

getFilteredName

public String getFilteredName(String oldFilename)
Description copied from interface: FormatFilter
Get a filename for a newly created filtered bitstream

Parameters:
oldFilename - name of source bitstream
Returns:
filename generated by the filter - for example, document.pdf becomes document.pdf.txt

getBundleName

public String getBundleName()
Returns:
String bundle name

getFormatString

public String getFormatString()
Returns:
String bitstreamformat

getDescription

public String getDescription()
Returns:
String description

getDestinationStream

public InputStream getDestinationStream(InputStream source)
                                 throws Exception
Parameters:
source - source input stream
Returns:
InputStream the resulting input stream
Throws:
Exception


Copyright © 2010 DuraSpace. All Rights Reserved.