Package com.enonic.xp.image
Class ImageHelper
- java.lang.Object
-
- com.enonic.xp.image.ImageHelper
-
public final class ImageHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BufferedImagecreateImage(int width, int height, boolean hasAlpha)static BufferedImagecreateImage(BufferedImage src, boolean hasAlpha)Deprecated.static StringcreateImagePlaceholder(int width, int height)static StringgetFormatByMimeType(String mimeType)static BufferedImagegetScaledInstance(BufferedImage img, int width, int height)static ImageWritergetWriterByFormat(String format)static BufferedImageremoveAlphaChannel(BufferedImage img, int color)static BufferedImagescaleSquare(BufferedImage source, int size)static BufferedImagescaleSquare(BufferedImage source, int size, double xOffset, double yOffset)static byte[]serializeImage(BufferedImage bufferedImage, String mimeType, int quality)Deprecated.static booleansupportsAlphaChannel(String format)Deprecated.static BufferedImagetoBufferedImage(InputStream inputStream)Deprecated.static ByteSourcetoByteSource(BufferedImage image, String format)Deprecated.static byte[]writeImage(BufferedImage image, String format, int quality)Deprecated.static voidwriteImage(OutputStream out, BufferedImage image, String format, int quality)static voidwriteImage(OutputStream out, BufferedImage image, String format, int quality, boolean progressive)
-
-
-
Method Detail
-
createImagePlaceholder
public static String createImagePlaceholder(int width, int height)
-
toBufferedImage
@Deprecated public static BufferedImage toBufferedImage(InputStream inputStream)
Deprecated.
-
toByteSource
@Deprecated public static ByteSource toByteSource(BufferedImage image, String format)
Deprecated.
-
getWriterByFormat
public static ImageWriter getWriterByFormat(String format)
-
getFormatByMimeType
public static String getFormatByMimeType(String mimeType) throws IOException
- Throws:
IOException
-
serializeImage
@Deprecated public static byte[] serializeImage(BufferedImage bufferedImage, String mimeType, int quality) throws IOException
Deprecated.- Throws:
IOException
-
writeImage
@Deprecated public static byte[] writeImage(BufferedImage image, String format, int quality) throws IOException
Deprecated.- Throws:
IOException
-
writeImage
public static void writeImage(OutputStream out, BufferedImage image, String format, int quality) throws IOException
- Throws:
IOException
-
writeImage
public static void writeImage(OutputStream out, BufferedImage image, String format, int quality, boolean progressive) throws IOException
- Throws:
IOException
-
createImage
@Deprecated public static BufferedImage createImage(BufferedImage src, boolean hasAlpha)
Deprecated.
-
createImage
public static BufferedImage createImage(int width, int height, boolean hasAlpha)
-
getScaledInstance
public static BufferedImage getScaledInstance(BufferedImage img, int width, int height)
-
removeAlphaChannel
public static BufferedImage removeAlphaChannel(BufferedImage img, int color)
-
supportsAlphaChannel
@Deprecated public static boolean supportsAlphaChannel(String format)
Deprecated.
-
scaleSquare
public static BufferedImage scaleSquare(BufferedImage source, int size)
-
scaleSquare
public static BufferedImage scaleSquare(BufferedImage source, int size, double xOffset, double yOffset)
-
-