Class ImageToolUtil_IW

Object
com.liferay.portal.image.ImageToolUtil_IW

public class ImageToolUtil_IW extends Object
Author:
Brian Wing Shun Chan
  • Method Details

    • getInstance

      public static ImageToolUtil_IW getInstance()
    • convertCMYKtoRGB

      public Future<RenderedImage> convertCMYKtoRGB(byte[] bytes, String type)
    • convertImageType

      public BufferedImage convertImageType(BufferedImage sourceImage, int type)
    • crop

      public RenderedImage crop(RenderedImage renderedImage, int height, int width, int x, int y)
    • encodeGIF

      public void encodeGIF(RenderedImage renderedImage, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • encodeWBMP

      public void encodeWBMP(RenderedImage renderedImage, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • flipHorizontal

      public RenderedImage flipHorizontal(RenderedImage renderedImage)
    • flipVertical

      public RenderedImage flipVertical(RenderedImage renderedImage)
    • getBufferedImage

      public BufferedImage getBufferedImage(RenderedImage renderedImage)
    • getBytes

      public byte[] getBytes(RenderedImage renderedImage, String contentType) throws IOException
      Throws:
      IOException
    • getDefaultCompanyLogo

      public com.liferay.portal.kernel.model.Image getDefaultCompanyLogo()
    • getDefaultOrganizationLogo

      public com.liferay.portal.kernel.model.Image getDefaultOrganizationLogo()
    • getDefaultSpacer

      public com.liferay.portal.kernel.model.Image getDefaultSpacer()
    • getDefaultUserFemalePortrait

      public com.liferay.portal.kernel.model.Image getDefaultUserFemalePortrait()
    • getDefaultUserMalePortrait

      public com.liferay.portal.kernel.model.Image getDefaultUserMalePortrait()
    • getDefaultUserPortrait

      public com.liferay.portal.kernel.model.Image getDefaultUserPortrait()
    • getImage

      public com.liferay.portal.kernel.model.Image getImage(byte[] bytes) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • getImage

      public com.liferay.portal.kernel.model.Image getImage(File file) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • getImage

      public com.liferay.portal.kernel.model.Image getImage(InputStream inputStream) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • getImage

      public com.liferay.portal.kernel.model.Image getImage(InputStream inputStream, boolean cleanUpStream) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • isNullOrDefaultSpacer

      public boolean isNullOrDefaultSpacer(byte[] bytes)
    • read

      public com.liferay.portal.kernel.image.ImageBag read(byte[] bytes) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • read

      public com.liferay.portal.kernel.image.ImageBag read(File file) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • read

      public com.liferay.portal.kernel.image.ImageBag read(InputStream inputStream) throws com.liferay.portal.kernel.exception.ImageResolutionException, IOException
      Throws:
      com.liferay.portal.kernel.exception.ImageResolutionException
      IOException
    • rotate

      public RenderedImage rotate(RenderedImage renderedImage, int degrees)
    • scale

      public RenderedImage scale(RenderedImage renderedImage, int width)
    • scale

      public RenderedImage scale(RenderedImage renderedImage, int maxHeight, int maxWidth)
    • write

      public void write(RenderedImage renderedImage, String contentType, OutputStream outputStream) throws IOException
      Throws:
      IOException