-
Notifications
You must be signed in to change notification settings - Fork 0
Class ImageList
Kristian Virtanen edited this page Oct 28, 2024
·
5 revisions
The ImageList class provides methods to load, store, and retrieve images from local file paths or URLs. It maintains an internal dictionary (images) that associates each image with a unique name for efficient access. The class also includes error handling via the LastError property, which stores the most recent error message if an operation fails.
-
Description: Stores the last error message, if any operation fails, including a timestamp in
yyyy-MM-dd HH:mm:ssformat. -
Example:
"2024-10-16 14:30:00: Image with name Image1 not found." - Differences from orig. SB: Not available at original SB.
- Description: Loads an image from a file path or URL and returns a unique name for the loaded image.
-
Parameters:
-
fileNameOrUrl: The file path or URL of the image to load.
-
- Returns: The name of the image, or an empty string if the image could not be loaded.
- Differences from orig. SB: Orig. returns image name or empty string, while SBOE returns image name or null.
- Description: Retrieves the width of a stored image.
-
Parameters:
-
imageName: The name of the image to retrieve its width.
-
-
Returns: The width of the image in pixels, or
0if the image is not found. - Differences from orig. SB: none.
- Description: Retrieves the height of a stored image.
-
Parameters:
-
imageName: The name of the image to retrieve its height.
-
-
Returns: The height of the image in pixels, or
0if the image is not found. - Differences from orig. SB: none.
-
Description: Retrieves the
Imageobject by its unique name. -
Parameters:
-
imageName: The name of the image to retrieve.
-
-
Returns: The
Imageobject, ornullif the image is not found. - Differences from orig. SB: New feature, orig. SB did not have this.