public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats
| Constructor and Description |
|---|
JPEGFilter() |
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
getBlurredInstance(BufferedImage buf) |
String |
getBundleName() |
String |
getDescription() |
InputStream |
getDestinationStream(InputStream source) |
String |
getFilteredName(String oldFilename)
Get a filename for a newly created filtered bitstream
|
String |
getFormatString() |
String[] |
getInputDescriptions() |
String[] |
getInputExtensions() |
String[] |
getInputMIMETypes() |
BufferedImage |
getNormalizedInstance(BufferedImage buf) |
BufferedImage |
getScaledInstance(BufferedImage buf,
int targetWidth,
int targetHeight,
Object hint,
boolean higherQuality)
Convenience method that returns a scaled instance of the
provided
BufferedImage. |
postProcessBitstream, preProcessBitstreampublic String getFilteredName(String oldFilename)
FormatFiltergetFilteredName in interface FormatFilteroldFilename - name of source bitstreampublic String getBundleName()
getBundleName in interface FormatFilterpublic String getFormatString()
getFormatString in interface FormatFilterpublic String getDescription()
getDescription in interface FormatFilterpublic InputStream getDestinationStream(InputStream source) throws Exception
getDestinationStream in interface FormatFiltersource - source input streamExceptionpublic String[] getInputMIMETypes()
getInputMIMETypes in interface SelfRegisterInputFormatspublic String[] getInputDescriptions()
getInputDescriptions in interface SelfRegisterInputFormatspublic String[] getInputExtensions()
getInputExtensions in interface SelfRegisterInputFormatspublic BufferedImage getNormalizedInstance(BufferedImage buf)
public BufferedImage getBlurredInstance(BufferedImage buf)
public BufferedImage getScaledInstance(BufferedImage buf, int targetWidth, int targetHeight, Object hint, boolean higherQuality)
BufferedImage.buf - the original image to be scaledtargetWidth - the desired width of the scaled instance,
in pixelstargetHeight - the desired height of the scaled instance,
in pixelshint - one of the rendering hints that corresponds to
RenderingHints.KEY_INTERPOLATION (e.g.
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR,
RenderingHints.VALUE_INTERPOLATION_BILINEAR,
RenderingHints.VALUE_INTERPOLATION_BICUBIC)higherQuality - if true, this method will use a multi-step
scaling technique that provides higher quality than the usual
one-step technique (only useful in downscaling cases, where
targetWidth or targetHeight is
smaller than the original dimensions, and generally only when
the BILINEAR hint is specified)BufferedImageCopyright © 2014 DuraSpace. All Rights Reserved.