Package de.xima.fc.utils
Class XImageUtils
- java.lang.Object
-
- de.xima.fc.utils.XImageUtils
-
public final class XImageUtils extends Object
Utility class for image operations.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageSize
findImageSize(InputStream imageData, String fileName)
Finds the size of an image file.static ImageSize
findImageSize(Path imageData)
Finds the size of an image file.static ImageSize
findImageSize(Path imageData, String fileName)
Finds the size of an image file.
-
-
-
Method Detail
-
findImageSize
public static ImageSize findImageSize(Path imageData) throws IOException
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
public static ImageSize findImageSize(Path imageData, String fileName) throws IOException
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
public static ImageSize findImageSize(InputStream imageData, String fileName) throws IOException
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.
-
-