Package com.kheops.util
Class ImageUtil
java.lang.Object
com.kheops.util.ImageUtil
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic BufferedImagestatic BufferedImageflip(BufferedImage bufImage) static BufferedImagegetFasterScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean progressiveBilinear) static ImageMetadataTaggetImageMetadataTag(String directoryName, int tagType, List<ImageMetadataTag> imageMetadataTags) static ImageMetadataTaggetImageMetadataTag(String directoryName, String tagName, List<ImageMetadataTag> imageMetadataTags) static ImageMetadataTag[]getImageMetadataTags(int tagType, List<ImageMetadataTag> imageMetadataTags) static ImageMetadataTag[]getImageMetadataTags(String tagName, List<ImageMetadataTag> imageMetadataTags) static List<ImageMetadataTag> getMetadataTags(File file) static List<ImageMetadataTag> getMetadataTags(InputStream stream) static int[]getResizedDimensions(int originalWidth, int originalHeight, int targetWidth, int targetHeight) Calculates a cross product from the original dimensions.static BufferedImagerotate(BufferedImage bufImage, double degrees) static BufferedImagetrim(BufferedImage image) 
- 
Constructor Details- 
ImageUtilpublic ImageUtil()
 
- 
- 
Method Details- 
getMetadataTags- Throws:
- Exception
 
- 
getMetadataTags- Throws:
- Exception
 
- 
getImageMetadataTagspublic static ImageMetadataTag[] getImageMetadataTags(int tagType, List<ImageMetadataTag> imageMetadataTags) 
- 
getImageMetadataTagpublic static ImageMetadataTag getImageMetadataTag(String directoryName, int tagType, List<ImageMetadataTag> imageMetadataTags) 
- 
getImageMetadataTagspublic static ImageMetadataTag[] getImageMetadataTags(String tagName, List<ImageMetadataTag> imageMetadataTags) 
- 
getImageMetadataTagpublic static ImageMetadataTag getImageMetadataTag(String directoryName, String tagName, List<ImageMetadataTag> imageMetadataTags) 
- 
applyImageRotation
- 
rotate
- 
flip
- 
getFasterScaledInstancepublic static BufferedImage getFasterScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean progressiveBilinear) 
- 
getResizedDimensionspublic static int[] getResizedDimensions(int originalWidth, int originalHeight, int targetWidth, int targetHeight) Calculates a cross product from the original dimensions. Returns proportionally resized dimensions.- Parameters:
- 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).
- Returns:
- The proportionally resized image dimensions as an int[2]. The width being stored at index 0. The height being stored at index 1. If both height and width passed as argument are invalid input: '<'= 0, return the original image dimensions.
 
- 
trim
 
-