@Beta public final class ImageHelper extends Object
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
createImage(BufferedImage src,
boolean hasAlpha) |
static BufferedImage |
createImage(int width,
int height,
boolean hasAlpha) |
static String |
createImagePlaceholder(int width,
int height) |
static BufferedImage |
getScaledInstance(BufferedImage img,
int targetWidth,
int targetHeight) |
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 boolean |
supportsAlphaChannel(String format) |
static BufferedImage |
toBufferedImage(InputStream inputStream) |
static com.google.common.io.ByteSource |
toByteSource(BufferedImage image,
String format) |
static byte[] |
writeImage(BufferedImage image,
String format,
int quality) |
static void |
writeImage(OutputStream out,
BufferedImage image,
String format,
int quality) |
public static String createImagePlaceholder(int width, int height)
public static BufferedImage toBufferedImage(InputStream inputStream)
public static com.google.common.io.ByteSource toByteSource(BufferedImage image, String format)
public static ImageWriter getWriterByFormat(String format)
public static byte[] writeImage(BufferedImage image, String format, int quality) throws IOException
IOException
public static void writeImage(OutputStream out, BufferedImage image, String format, int quality) throws IOException
IOException
public static BufferedImage createImage(BufferedImage src, boolean hasAlpha)
public static BufferedImage createImage(int width, int height, boolean hasAlpha)
public static BufferedImage getScaledInstance(BufferedImage img, int targetWidth, int targetHeight)
public static BufferedImage removeAlphaChannel(BufferedImage img, int color)
public static boolean supportsAlphaChannel(String format)
public static BufferedImage scaleSquare(BufferedImage source, int size)
public static BufferedImage scaleSquare(BufferedImage source, int size, double xOffset, double yOffset)