com.liferay.portal.image
Class ImageProcessorImpl
java.lang.Object
com.liferay.portal.image.ImageProcessorImpl
- All Implemented Interfaces:
- com.liferay.portal.kernel.image.ImageProcessor
public class ImageProcessorImpl
- extends java.lang.Object
- implements com.liferay.portal.kernel.image.ImageProcessor
View Source
- Author:
- Brian Wing Shun Chan
Fields inherited from interface com.liferay.portal.kernel.image.ImageProcessor |
TYPE_BMP, TYPE_GIF, TYPE_JPEG, TYPE_NOT_AVAILABLE, TYPE_PNG, TYPE_TIFF |
Method Summary |
java.awt.image.BufferedImage |
convertImageType(java.awt.image.BufferedImage sourceImage,
int type)
|
void |
encodeGIF(java.awt.image.RenderedImage renderedImage,
java.io.OutputStream os)
|
void |
encodeWBMP(java.awt.image.RenderedImage renderedImage,
java.io.OutputStream os)
|
java.awt.image.BufferedImage |
getBufferedImage(java.awt.image.RenderedImage renderedImage)
|
static ImageProcessorImpl |
getInstance()
|
com.liferay.portal.kernel.image.ImageBag |
read(byte[] bytes)
|
com.liferay.portal.kernel.image.ImageBag |
read(java.io.File file)
|
java.awt.image.RenderedImage |
scale(java.awt.image.RenderedImage renderedImage,
int maxHeight,
int maxWidth)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageProcessorImpl
public ImageProcessorImpl()
getInstance
public static ImageProcessorImpl getInstance()
convertImageType
public java.awt.image.BufferedImage convertImageType(java.awt.image.BufferedImage sourceImage,
int type)
- Specified by:
convertImageType
in interface com.liferay.portal.kernel.image.ImageProcessor
encodeGIF
public void encodeGIF(java.awt.image.RenderedImage renderedImage,
java.io.OutputStream os)
throws java.io.IOException
- Specified by:
encodeGIF
in interface com.liferay.portal.kernel.image.ImageProcessor
- Throws:
java.io.IOException
encodeWBMP
public void encodeWBMP(java.awt.image.RenderedImage renderedImage,
java.io.OutputStream os)
throws java.io.IOException
- Specified by:
encodeWBMP
in interface com.liferay.portal.kernel.image.ImageProcessor
- Throws:
java.io.IOException
getBufferedImage
public java.awt.image.BufferedImage getBufferedImage(java.awt.image.RenderedImage renderedImage)
- Specified by:
getBufferedImage
in interface com.liferay.portal.kernel.image.ImageProcessor
read
public com.liferay.portal.kernel.image.ImageBag read(java.io.File file)
throws java.io.IOException
- Specified by:
read
in interface com.liferay.portal.kernel.image.ImageProcessor
- Throws:
java.io.IOException
read
public com.liferay.portal.kernel.image.ImageBag read(byte[] bytes)
- Specified by:
read
in interface com.liferay.portal.kernel.image.ImageProcessor
scale
public java.awt.image.RenderedImage scale(java.awt.image.RenderedImage renderedImage,
int maxHeight,
int maxWidth)
- Specified by:
scale
in interface com.liferay.portal.kernel.image.ImageProcessor