|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.fwk.image.AbstractImageResizer
public abstract class AbstractImageResizer
A abstract implementation of ImageResizer that performs the common tasks of reading the image and writing the
resized image. The sub-class is expected to provide the implementation for the real resizing algorithm in AbstractImageResizer.resizeImage(BufferedImage,int,int).
| Nested Class Summary | |
|---|---|
static class |
AbstractImageResizer.ImageWithReader
|
| Field Summary |
|---|
| Fields inherited from interface dekoh.portal.fwk.image.ImageResizer |
|---|
DEFAULT_COMPRESSION_QUALITY |
| Constructor Summary | |
|---|---|
AbstractImageResizer()
|
|
| Method Summary | |
|---|---|
ImageReader |
getImageReader(ImageInputStream stream,
File infile)
|
protected int |
getImageType(BufferedImage image)
Returns the type of the image for the given image. |
BufferedImage |
readImage(ImageReader reader,
ImageInputStream stream)
|
void |
resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight)
Read an image from the input file, resize the image and write it to the destination file. |
void |
resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square)
Read an image from the input file, resize the image and write it to the destination file. |
void |
resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square,
EXIFOrientation photoOrientation)
Read an image from the input file, resize the image and write it to the destination file. |
AbstractImageResizer.ImageWithReader |
resizeAndReturn(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square,
EXIFOrientation photoOrientation)
|
BufferedImage |
resizeAndSaveBufferedImage(AbstractImageResizer.ImageWithReader bufferedImage,
File outFile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square)
|
abstract BufferedImage |
resizeImage(BufferedImage origImage,
int newWidth,
int newHeight)
The real implementation for image resizing to be provided by subclasses. |
BufferedImage |
resizeToSize(BufferedImage image,
boolean square,
int maxWidth,
int maxHeight)
|
BufferedImage |
toBufferedImage(BufferedImage origImage,
int newWidth,
int newHeight)
|
BufferedImage |
toBufferedImage(Image origImage,
int imageType,
int newWidth,
int newHeight)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractImageResizer()
| Method Detail |
|---|
public final void resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight)
throws IOException
ImageResizerImageResizer.resize(java.io.File,java.io.File,float,int,int,boolean,EXIFOrientation) with default value of square as false.
resize in interface ImageResizerIOException
public final void resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square)
throws IOException
ImageResizer
resize in interface ImageResizerIOException
public final void resize(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square,
EXIFOrientation photoOrientation)
throws IOException
ImageResizer
resize in interface ImageResizerIOException
public final AbstractImageResizer.ImageWithReader resizeAndReturn(File infile,
File outfile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square,
EXIFOrientation photoOrientation)
throws IOException
IOException
public final BufferedImage resizeAndSaveBufferedImage(AbstractImageResizer.ImageWithReader bufferedImage,
File outFile,
float compressionQuality,
int maxWidth,
int maxHeight,
boolean square)
throws IOException
IOException
public BufferedImage resizeToSize(BufferedImage image,
boolean square,
int maxWidth,
int maxHeight)
public ImageReader getImageReader(ImageInputStream stream,
File infile)
throws IIOException
IIOException
public BufferedImage readImage(ImageReader reader,
ImageInputStream stream)
throws IOException
IOException
public abstract BufferedImage resizeImage(BufferedImage origImage,
int newWidth,
int newHeight)
origImage - The image read from the filenewWidth - The width of the resized image in keeping with the aspect rationewHeight - The height of the resized image in keeping with the aspect ratio
public BufferedImage toBufferedImage(BufferedImage origImage,
int newWidth,
int newHeight)
public BufferedImage toBufferedImage(Image origImage,
int imageType,
int newWidth,
int newHeight)
protected int getImageType(BufferedImage image)
BufferedImage.TYPE_INT_ARGB_PRE or BufferedImage.TYPE_INT_ARGB
or BufferedImage.TYPE_INT_RGB accordingly.
image - The BufferedImage whose type needs to be found.
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers