public class ImageUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ImageUtils.ReadableImageFilter |
static class |
ImageUtils.WritableImageFilter |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
convertToRgb(BufferedImage image) |
static BufferedImage |
convertToRgb(BufferedImage image,
boolean flushSrcImage) |
static BufferedImage |
convertToRgb(BufferedImage image,
Color background) |
static BufferedImage |
convertToRgb(BufferedImage image,
Color background,
boolean flushSrcImage) |
static BufferedImage |
crop(BufferedImage image,
int x,
int y,
int width,
int height) |
static BufferedImage |
cropToRatio(BufferedImage image,
int ratioWidth,
int ratioHeight) |
static BufferedImage |
flipHorizontal(BufferedImage image) |
static BufferedImage |
flipVertical(BufferedImage image) |
static void |
flush(Image image) |
static int |
getPixelsForResolution(int pixels,
int resolution) |
static File |
getPreviewImage(File tempDir,
File imageLocation,
int width,
int height) |
static File |
getPreviewImage(ImmoToolProject project,
File imageLocation,
int width,
int height) |
static boolean |
hasAlpha(BufferedImage image) |
static boolean |
isReadableFormat(String format) |
static boolean |
isReadableMimeType(String mimeType) |
static boolean |
isReadableSuffix(String suffix) |
static boolean |
isWritableFormat(String format) |
static boolean |
isWritableMimeType(String mimeType) |
static boolean |
isWritableSuffix(String suffix) |
static BufferedImage |
read(File imageLocation) |
static BufferedImage |
read(InputStream imageLocation) |
static BufferedImage |
read(URL imageLocation) |
static BufferedImage |
readAsRgb(File imageLocation) |
static BufferedImage |
readAsRgb(InputStream imageLocation) |
static BufferedImage |
readAsRgb(URL imageLocation) |
static BufferedImage |
readPreviewFromCache(File tempDir,
File imageLocation,
int width,
int height) |
static BufferedImage |
readPreviewFromCache(ImmoToolProject project,
File imageLocation,
int width,
int height) |
static BufferedImage |
rotate(BufferedImage image,
org.imgscalr.Scalr.Rotation rotation) |
static BufferedImage |
rotateToLeft(BufferedImage image) |
static BufferedImage |
rotateToRight(BufferedImage image) |
static BufferedImage |
scale(BufferedImage image,
int width,
int height) |
static BufferedImage |
scale(BufferedImage image,
int width,
int height,
org.imgscalr.Scalr.Method method,
org.imgscalr.Scalr.Mode mode) |
static BufferedImage |
scaleToFit(BufferedImage image,
int width,
int height) |
static BufferedImage |
scaleToFit(BufferedImage image,
int width,
int height,
int resolution) |
static BufferedImage |
scaleToFitExactly(BufferedImage image,
int width,
int height) |
static BufferedImage |
scaleToFitExactly(BufferedImage image,
int width,
int height,
int resolution) |
static BufferedImage |
scaleToFitHeight(BufferedImage image,
int width,
int height) |
static BufferedImage |
scaleToFitHeight(BufferedImage image,
int width,
int height,
int resolution) |
static BufferedImage |
scaleToFitWidth(BufferedImage image,
int width,
int height) |
static BufferedImage |
scaleToFitWidth(BufferedImage image,
int width,
int height,
int resolution) |
static BufferedImage |
toBufferedImage(Image image) |
static BufferedImage |
toBufferedImage(Image image,
int type) |
static void |
write(BufferedImage image,
File target,
String format) |
static void |
write(BufferedImage image,
OutputStream target,
String format) |
static void |
writeJpg(BufferedImage image,
File target) |
static void |
writeJpg(BufferedImage image,
File target,
boolean forceRgb) |
static void |
writeJpg(BufferedImage image,
OutputStream target) |
static void |
writeJpg(BufferedImage image,
OutputStream target,
boolean forceRgb) |
static void |
writePng(BufferedImage image,
File target) |
static void |
writePng(BufferedImage image,
OutputStream target) |
public static BufferedImage convertToRgb(BufferedImage image)
public static BufferedImage convertToRgb(BufferedImage image, Color background)
public static BufferedImage convertToRgb(BufferedImage image, boolean flushSrcImage)
public static BufferedImage convertToRgb(BufferedImage image, Color background, boolean flushSrcImage)
public static BufferedImage crop(BufferedImage image, int x, int y, int width, int height)
public static BufferedImage cropToRatio(BufferedImage image, int ratioWidth, int ratioHeight)
public static BufferedImage flipHorizontal(BufferedImage image)
public static BufferedImage flipVertical(BufferedImage image)
public static void flush(Image image)
public static int getPixelsForResolution(int pixels, int resolution)
public static File getPreviewImage(ImmoToolProject project, File imageLocation, int width, int height)
public static File getPreviewImage(File tempDir, File imageLocation, int width, int height)
public static boolean hasAlpha(BufferedImage image)
public static boolean isReadableFormat(String format)
public static boolean isReadableMimeType(String mimeType)
public static boolean isReadableSuffix(String suffix)
public static boolean isWritableFormat(String format)
public static boolean isWritableMimeType(String mimeType)
public static boolean isWritableSuffix(String suffix)
public static BufferedImage read(File imageLocation) throws IOException
IOException
public static BufferedImage read(InputStream imageLocation) throws IOException
IOException
public static BufferedImage read(URL imageLocation) throws IOException
IOException
public static BufferedImage readAsRgb(File imageLocation) throws IOException
IOException
public static BufferedImage readAsRgb(InputStream imageLocation) throws IOException
IOException
public static BufferedImage readAsRgb(URL imageLocation) throws IOException
IOException
public static BufferedImage readPreviewFromCache(ImmoToolProject project, File imageLocation, int width, int height) throws IOException
IOException
public static BufferedImage readPreviewFromCache(File tempDir, File imageLocation, int width, int height) throws IOException
IOException
public static BufferedImage rotate(BufferedImage image, org.imgscalr.Scalr.Rotation rotation)
public static BufferedImage rotateToLeft(BufferedImage image)
public static BufferedImage rotateToRight(BufferedImage image)
public static BufferedImage scale(BufferedImage image, int width, int height)
public static BufferedImage scale(BufferedImage image, int width, int height, org.imgscalr.Scalr.Method method, org.imgscalr.Scalr.Mode mode)
public static BufferedImage scaleToFit(BufferedImage image, int width, int height)
public static BufferedImage scaleToFit(BufferedImage image, int width, int height, int resolution)
public static BufferedImage scaleToFitExactly(BufferedImage image, int width, int height)
public static BufferedImage scaleToFitExactly(BufferedImage image, int width, int height, int resolution)
public static BufferedImage scaleToFitHeight(BufferedImage image, int width, int height)
public static BufferedImage scaleToFitHeight(BufferedImage image, int width, int height, int resolution)
public static BufferedImage scaleToFitWidth(BufferedImage image, int width, int height)
public static BufferedImage scaleToFitWidth(BufferedImage image, int width, int height, int resolution)
public static BufferedImage toBufferedImage(Image image)
public static BufferedImage toBufferedImage(Image image, int type)
public static void write(BufferedImage image, File target, String format) throws IOException
IOException
public static void write(BufferedImage image, OutputStream target, String format) throws IOException
IOException
public static void writeJpg(BufferedImage image, File target) throws IOException
IOException
public static void writeJpg(BufferedImage image, File target, boolean forceRgb) throws IOException
IOException
public static void writeJpg(BufferedImage image, OutputStream target) throws IOException
IOException
public static void writeJpg(BufferedImage image, OutputStream target, boolean forceRgb) throws IOException
IOException
public static void writePng(BufferedImage image, File target) throws IOException
IOException
public static void writePng(BufferedImage image, OutputStream target) throws IOException
IOException
Copyright © 2015 OpenEstate. All rights reserved.