Description
The LoadBitmap
method is a static utility function provided by the Editor.EditorUtility
class. It is used to load a bitmap image from a specified file path and return it as a Sandbox.Utility.FloatBitmap
object. This method is particularly useful in scenarios where you need to manipulate or analyze image data within the s&box editor environment.
Usage
To use the LoadBitmap
method, you need to provide the file path of the image you wish to load as a string. The method will return a FloatBitmap
object representing the image data.
Ensure that the file path is correct and accessible by the application to avoid any file not found exceptions.
Example
// Example usage of LoadBitmap
string filePath = "C:\\Images\\example.png";
Sandbox.Utility.FloatBitmap bitmap = Editor.EditorUtility.LoadBitmap(filePath);
// Use the bitmap for further processing
// For example, accessing pixel data or performing image analysis