Liferay 7.0-ce-b8 portal-impl

com.liferay.portal.image
Class ImageToolImpl

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

public class ImageToolImpl
extends Object
implements com.liferay.portal.kernel.image.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
 
Method Summary
 void afterPropertiesSet()
           
 Future<RenderedImage> convertCMYKtoRGB(byte[] bytes, String type)
           
 BufferedImage convertImageType(BufferedImage sourceImage, int type)
           
 RenderedImage crop(RenderedImage renderedImage, int height, int width, int x, int y)
           
protected  RenderedImage doScale(RenderedImage renderedImage, int scaledHeight, int scaledWidth)
           
 void encodeGIF(RenderedImage renderedImage, OutputStream os)
           
 void encodeWBMP(RenderedImage renderedImage, OutputStream os)
           
 BufferedImage getBufferedImage(RenderedImage renderedImage)
           
 byte[] getBytes(RenderedImage renderedImage, String contentType)
           
 com.liferay.portal.kernel.model.Image getDefaultCompanyLogo()
           
 com.liferay.portal.kernel.model.Image getDefaultOrganizationLogo()
           
 com.liferay.portal.kernel.model.Image getDefaultSpacer()
           
 com.liferay.portal.kernel.model.Image getDefaultUserFemalePortrait()
           
 com.liferay.portal.kernel.model.Image getDefaultUserMalePortrait()
           
 com.liferay.portal.kernel.model.Image getImage(byte[] bytes)
           
 com.liferay.portal.kernel.model.Image getImage(File file)
           
 com.liferay.portal.kernel.model.Image getImage(InputStream is)
           
 com.liferay.portal.kernel.model.Image getImage(InputStream is, boolean cleanUpStream)
           
protected  com.liferay.portal.kernel.image.ImageMagick getImageMagick()
           
static com.liferay.portal.kernel.image.ImageTool getInstance()
           
 boolean isNullOrDefaultSpacer(byte[] bytes)
           
protected  void orderImageReaderSpis()
           
 com.liferay.portal.kernel.image.ImageBag read(byte[] bytes)
           
 com.liferay.portal.kernel.image.ImageBag read(File file)
           
 com.liferay.portal.kernel.image.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
 

Method Detail

getInstance

public static com.liferay.portal.kernel.image.ImageTool getInstance()

afterPropertiesSet

public void afterPropertiesSet()

convertCMYKtoRGB

public Future<RenderedImage> convertCMYKtoRGB(byte[] bytes,
                                              String type)
Specified by:
convertCMYKtoRGB in interface com.liferay.portal.kernel.image.ImageTool

convertImageType

public BufferedImage convertImageType(BufferedImage sourceImage,
                                      int type)
Specified by:
convertImageType in interface com.liferay.portal.kernel.image.ImageTool

crop

public RenderedImage crop(RenderedImage renderedImage,
                          int height,
                          int width,
                          int x,
                          int y)
Specified by:
crop in interface com.liferay.portal.kernel.image.ImageTool

encodeGIF

public void encodeGIF(RenderedImage renderedImage,
                      OutputStream os)
               throws IOException
Specified by:
encodeGIF in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

encodeWBMP

public void encodeWBMP(RenderedImage renderedImage,
                       OutputStream os)
                throws IOException
Specified by:
encodeWBMP in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

getBufferedImage

public BufferedImage getBufferedImage(RenderedImage renderedImage)
Specified by:
getBufferedImage in interface com.liferay.portal.kernel.image.ImageTool

getBytes

public byte[] getBytes(RenderedImage renderedImage,
                       String contentType)
                throws IOException
Specified by:
getBytes in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

getDefaultCompanyLogo

public com.liferay.portal.kernel.model.Image getDefaultCompanyLogo()
Specified by:
getDefaultCompanyLogo in interface com.liferay.portal.kernel.image.ImageTool

getDefaultOrganizationLogo

public com.liferay.portal.kernel.model.Image getDefaultOrganizationLogo()
Specified by:
getDefaultOrganizationLogo in interface com.liferay.portal.kernel.image.ImageTool

getDefaultSpacer

public com.liferay.portal.kernel.model.Image getDefaultSpacer()
Specified by:
getDefaultSpacer in interface com.liferay.portal.kernel.image.ImageTool

getDefaultUserFemalePortrait

public com.liferay.portal.kernel.model.Image getDefaultUserFemalePortrait()
Specified by:
getDefaultUserFemalePortrait in interface com.liferay.portal.kernel.image.ImageTool

getDefaultUserMalePortrait

public com.liferay.portal.kernel.model.Image getDefaultUserMalePortrait()
Specified by:
getDefaultUserMalePortrait in interface com.liferay.portal.kernel.image.ImageTool

getImage

public com.liferay.portal.kernel.model.Image getImage(byte[] bytes)
                                               throws IOException
Specified by:
getImage in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

getImage

public com.liferay.portal.kernel.model.Image getImage(File file)
                                               throws IOException
Specified by:
getImage in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

getImage

public com.liferay.portal.kernel.model.Image getImage(InputStream is)
                                               throws IOException
Specified by:
getImage in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

getImage

public com.liferay.portal.kernel.model.Image getImage(InputStream is,
                                                      boolean cleanUpStream)
                                               throws IOException
Specified by:
getImage in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

isNullOrDefaultSpacer

public boolean isNullOrDefaultSpacer(byte[] bytes)
Specified by:
isNullOrDefaultSpacer in interface com.liferay.portal.kernel.image.ImageTool

read

public com.liferay.portal.kernel.image.ImageBag read(byte[] bytes)
                                              throws IOException
Specified by:
read in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

read

public com.liferay.portal.kernel.image.ImageBag read(File file)
                                              throws IOException
Specified by:
read in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

read

public com.liferay.portal.kernel.image.ImageBag read(InputStream inputStream)
                                              throws IOException
Specified by:
read in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

scale

public RenderedImage scale(RenderedImage renderedImage,
                           int width)
Specified by:
scale in interface com.liferay.portal.kernel.image.ImageTool

scale

public RenderedImage scale(RenderedImage renderedImage,
                           int maxHeight,
                           int maxWidth)
Specified by:
scale in interface com.liferay.portal.kernel.image.ImageTool

write

public void write(RenderedImage renderedImage,
                  String contentType,
                  OutputStream os)
           throws IOException
Specified by:
write in interface com.liferay.portal.kernel.image.ImageTool
Throws:
IOException

doScale

protected RenderedImage doScale(RenderedImage renderedImage,
                                int scaledHeight,
                                int scaledWidth)

getImageMagick

protected com.liferay.portal.kernel.image.ImageMagick getImageMagick()

orderImageReaderSpis

protected void orderImageReaderSpis()

toMultiByte

protected byte[] toMultiByte(int intValue)

Liferay 7.0-ce-b8 portal-impl