Liferay 6.2.0-ce-m1

com.liferay.portal.image
Class ImageToolImpl

java.lang.Object
  extended by com.liferay.portal.image.ImageToolImpl
All Implemented Interfaces:
ImageTool

public class ImageToolImpl
extends Object
implements ImageTool


Field Summary
 
Fields inherited from interface com.liferay.portal.kernel.image.ImageTool
TYPE_BMP, TYPE_GIF, TYPE_JPEG, TYPE_NOT_AVAILABLE, TYPE_PNG, TYPE_TIFF
 
Constructor Summary
ImageToolImpl()
           
 
Method Summary
 Future<RenderedImage> convertCMYKtoRGB(byte[] bytes, String type)
           
 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)
           
protected  ImageMagick getImageMagick()
           
static ImageTool getInstance()
           
 ImageBag read(byte[] bytes)
           
protected  RenderedImage read(byte[] bytes, String type)
           
 ImageBag read(File file)
           
 ImageBag read(InputStream inputStream)
           
 RenderedImage scale(RenderedImage renderedImage, int width)
           
 RenderedImage scale(RenderedImage renderedImage, int maxHeight, int maxWidth)
           
protected  byte[] toMultiByte(int intValue)
           
 void write(RenderedImage renderedImage, String contentType, OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageToolImpl

public ImageToolImpl()
Method Detail

getInstance

public static ImageTool getInstance()

convertCMYKtoRGB

public Future<RenderedImage> convertCMYKtoRGB(byte[] bytes,
                                              String type)
Specified by:
convertCMYKtoRGB in interface ImageTool

convertImageType

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

encodeGIF

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

encodeWBMP

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

getBufferedImage

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

getBytes

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

read

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

read

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

read

public ImageBag read(InputStream inputStream)
              throws IOException
Specified by:
read in interface ImageTool
Throws:
IOException

scale

public RenderedImage scale(RenderedImage renderedImage,
                           int width)
Specified by:
scale in interface ImageTool

scale

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

write

public void write(RenderedImage renderedImage,
                  String contentType,
                  OutputStream os)
           throws IOException
Specified by:
write in interface ImageTool
Throws:
IOException

getImageMagick

protected ImageMagick getImageMagick()

read

protected RenderedImage read(byte[] bytes,
                             String type)

toMultiByte

protected byte[] toMultiByte(int intValue)

Liferay 6.2.0-ce-m1