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 BufferedImage
createImage(int width, int height, boolean hasAlpha)
static BufferedImage
createImage(BufferedImage src, boolean hasAlpha)
Deprecated.static String
createImagePlaceholder(int width, int height)
static String
getFormatByMimeType(String mimeType)
static BufferedImage
getScaledInstance(BufferedImage img, int width, int height)
static ImageWriter
getWriterByFormat(String format)
static BufferedImage
removeAlphaChannel(BufferedImage img, int color)
static BufferedImage
scaleSquare(BufferedImage source, int size)
static BufferedImage
scaleSquare(BufferedImage source, int size, double xOffset, double yOffset)
static byte[]
serializeImage(BufferedImage bufferedImage, String mimeType, int quality)
Deprecated.static boolean
supportsAlphaChannel(String format)
Deprecated.static BufferedImage
toBufferedImage(InputStream inputStream)
Deprecated.static ByteSource
toByteSource(BufferedImage image, String format)
Deprecated.static byte[]
writeImage(BufferedImage image, String format, int quality)
Deprecated.static void
writeImage(OutputStream out, BufferedImage image, String format, int quality)
-
-
-
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
-
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)
-
-