Class XImageUtils
java.lang.Object
de.xima.fc.utils.XImageUtils
Utility class for image operations.
- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageSizefindImageSize(InputStream imageData, String fileName) Finds the size of an image file.static ImageSizefindImageSize(Path imageData) Finds the size of an image file.static ImageSizefindImageSize(Path imageData, String fileName) Finds the size of an image file.
-
Method Details
-
findImageSize
Finds the size of an image file. Determines the format from the given file name via the extension (.jpg, .png, etc.).- Parameters:
imageData- File with the image data.- Returns:
- Size of the image.
- Throws:
IOException- If the image size could not be determined.
-
findImageSize
Finds the size of an image file. Determines the format from the given file name via the extension (.jpg, .png, etc.).- Parameters:
imageData- File with the image data.fileName- Name of the file. Can also be just an extension, such as "png".- Returns:
- Size of the image.
- Throws:
IOException- If the image size could not be determined.
-
findImageSize
Finds the size of an image file. Determines the format from the given file name via the extension (.jpg, .png, etc.).- Parameters:
imageData- File with the image data.fileName- Name of the file. Can also be just an extension, such as "png".- Returns:
- Size of the image.
- Throws:
IOException- If the image size could not be determined.
-