Class ImageUtils
java.lang.Object
me.m64diamondstar.dialoguemaster.api.utils.ImageUtils
Utilities for images. Primarily used for importing widgets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getImageFormatFromUrl
(String urlString) Gets the image format of an url.static boolean
isSupportedFormat
(String format) Checks if a format is supported.static boolean
isValidImage
(String url) static boolean
isValidURL
(String url) Checks if a url is valid.
-
Constructor Details
-
ImageUtils
public ImageUtils()
-
-
Method Details
-
getImageFormatFromUrl
Gets the image format of an url.- Parameters:
urlString
- The url to get the format from.- Returns:
- The image format.
- Throws:
IOException
-
isSupportedFormat
Checks if a format is supported. (Only supported format is png)- Parameters:
format
- The format to check.- Returns:
- True if the format is supported, false otherwise.
-
isValidURL
Checks if a url is valid.- Parameters:
url
- The url to check.- Returns:
- True if the url is valid, false otherwise.
-
isValidImage
-