Liferay 6.0.5

com.liferay.portal.image
Class ImageProcessorImpl

java.lang.Object
  extended by com.liferay.portal.image.ImageProcessorImpl
All Implemented Interfaces:
ImageProcessor

public class ImageProcessorImpl
extends Object
implements ImageProcessor


Field Summary
 
Fields inherited from interface com.liferay.portal.kernel.image.ImageProcessor
TYPE_BMP, TYPE_GIF, TYPE_JPEG, TYPE_NOT_AVAILABLE, TYPE_PNG, TYPE_TIFF
 
Constructor Summary
ImageProcessorImpl()
           
 
Method Summary
 BufferedImage convertImageType(BufferedImage sourceImage, int type)
           
 void encodeGIF(RenderedImage renderedImage, OutputStream os)
           
 void encodeWBMP(RenderedImage renderedImage, OutputStream os)
           
 BufferedImage getBufferedImage(RenderedImage renderedImage)
           
 byte[] getBytes(RenderedImage renderedImage, String contentType)
           
static ImageProcessorImpl getInstance()
           
 ImageBag read(byte[] bytes)
           
 ImageBag read(File file)
           
 RenderedImage scale(RenderedImage renderedImage, int maxHeight, int maxWidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageProcessorImpl

public ImageProcessorImpl()
Method Detail

getInstance

public static ImageProcessorImpl getInstance()

convertImageType

public BufferedImage convertImageType(BufferedImage sourceImage,
                                      int type)
Specified by:
convertImageType in interface ImageProcessor

encodeGIF

public void encodeGIF(RenderedImage renderedImage,
                      OutputStream os)
               throws IOException
Specified by:
encodeGIF in interface ImageProcessor
Throws:
IOException

encodeWBMP

public void encodeWBMP(RenderedImage renderedImage,
                       OutputStream os)
                throws IOException
Specified by:
encodeWBMP in interface ImageProcessor
Throws:
IOException

getBufferedImage

public BufferedImage getBufferedImage(RenderedImage renderedImage)
Specified by:
getBufferedImage in interface ImageProcessor

getBytes

public byte[] getBytes(RenderedImage renderedImage,
                       String contentType)
                throws IOException
Specified by:
getBytes in interface ImageProcessor
Throws:
IOException

read

public ImageBag read(File file)
              throws IOException
Specified by:
read in interface ImageProcessor
Throws:
IOException

read

public ImageBag read(byte[] bytes)
Specified by:
read in interface ImageProcessor

scale

public RenderedImage scale(RenderedImage renderedImage,
                           int maxHeight,
                           int maxWidth)
Specified by:
scale in interface ImageProcessor

Liferay 6.0.5