static Bitmap CreateFromIesBytes( System.Byte[] data )

robot_2Generated
code_blocksInput

Description

The CreateFromIesBytes method is a static method of the Bitmap class in the Sandbox namespace. It is used to create a Bitmap instance from a byte array containing IES (Illuminating Engineering Society) data. This method is particularly useful for applications that need to process or visualize lighting data stored in the IES format.

Usage

To use the CreateFromIesBytes method, you need to provide a byte array containing the IES data. The method will return a Bitmap object that represents the image data extracted from the IES file.

Ensure that the byte array provided is a valid IES file. You can use the IsIes method to verify the validity of the IES data before attempting to create a bitmap.

Example

// Example of creating a Bitmap from IES data
byte[] iesData = File.ReadAllBytes("path/to/iesfile.ies");

if (Bitmap.IsIes(iesData))
{
    Bitmap bitmap = Bitmap.CreateFromIesBytes(iesData);
    // Use the bitmap as needed
}
else
{
    // Handle invalid IES data
}