Class ImgUtils
java.lang.Object
pro.verron.officestamper.utils.image.ImgUtils
Utility class for image-related operations such as format detection and
content type mapping.
-
Method Summary
Modifier and TypeMethodDescriptiondetectFormat(byte[] bytes) Detects the format and dimensions of an image from its byte content.supportedType(String imageType) Returns the MIME content type for a given image type string.
-
Method Details
-
detectFormat
Detects the format and dimensions of an image from its byte content. -
supportedType
Returns the MIME content type for a given image type string.
Supported types include: emf, svg, wmf, tif, png, jpeg, gif, bmp.
- Parameters:
imageType- the image type string (case-insensitive)- Returns:
- an
Optionalcontaining the MIME content type, or empty if the type is not supported
-