public class ImageUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ImageUtil.ImageTag |
Constructor and Description |
---|
ImageUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
applyImageRotation(java.io.ByteArrayInputStream bais) |
static java.awt.image.BufferedImage |
flip(java.awt.image.BufferedImage bufImage) |
static java.awt.image.BufferedImage |
getFasterScaledInstance(java.awt.image.BufferedImage img,
int targetWidth,
int targetHeight,
java.lang.Object hint,
boolean progressiveBilinear) |
static ImageMetadataTag |
getImageMetadataTag(java.lang.String directoryName,
int tagType,
java.util.List<ImageMetadataTag> imageMetadataTags) |
static ImageMetadataTag |
getImageMetadataTag(java.lang.String directoryName,
java.lang.String tagName,
java.util.List<ImageMetadataTag> imageMetadataTags) |
static ImageMetadataTag[] |
getImageMetadataTags(int tagType,
java.util.List<ImageMetadataTag> imageMetadataTags) |
static ImageMetadataTag[] |
getImageMetadataTags(java.lang.String tagName,
java.util.List<ImageMetadataTag> imageMetadataTags) |
static java.util.List<ImageMetadataTag> |
getMetadataTags(java.io.File file) |
static java.util.List<ImageMetadataTag> |
getMetadataTags(java.io.InputStream stream) |
static int[] |
getResizedDimensions(int originalWidth,
int originalHeight,
int targetWidth,
int targetHeight)
Calculates a cross product from the original dimensions.
|
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage bufImage,
double degrees) |
static java.awt.image.BufferedImage |
trim(java.awt.image.BufferedImage image) |
public static java.util.List<ImageMetadataTag> getMetadataTags(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ImageMetadataTag> getMetadataTags(java.io.File file) throws java.lang.Exception
java.lang.Exception
public static ImageMetadataTag[] getImageMetadataTags(int tagType, java.util.List<ImageMetadataTag> imageMetadataTags)
public static ImageMetadataTag getImageMetadataTag(java.lang.String directoryName, int tagType, java.util.List<ImageMetadataTag> imageMetadataTags)
public static ImageMetadataTag[] getImageMetadataTags(java.lang.String tagName, java.util.List<ImageMetadataTag> imageMetadataTags)
public static ImageMetadataTag getImageMetadataTag(java.lang.String directoryName, java.lang.String tagName, java.util.List<ImageMetadataTag> imageMetadataTags)
public static java.awt.image.BufferedImage applyImageRotation(java.io.ByteArrayInputStream bais)
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage bufImage, double degrees)
public static java.awt.image.BufferedImage flip(java.awt.image.BufferedImage bufImage)
public static java.awt.image.BufferedImage getFasterScaledInstance(java.awt.image.BufferedImage img, int targetWidth, int targetHeight, java.lang.Object hint, boolean progressiveBilinear)
public static int[] getResizedDimensions(int originalWidth, int originalHeight, int targetWidth, int targetHeight)
originalWidth
- The original document's width.originalHeight
- The original document's height.targetWidth
- If bigger than 0, proportionally resize the image to match the width provided (in pixels).targetHeight
- If bigger than 0, proportionally resize the image to match the height provided (in pixels).public static java.awt.image.BufferedImage trim(java.awt.image.BufferedImage image)