bool IsFloatingPoint { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsFloatingPoint property of the Bitmap class indicates whether the bitmap uses floating-point values for its pixel data. This is useful for determining the precision and format of the bitmap's color data.

Usage

Use the IsFloatingPoint property to check if a Bitmap instance is using floating-point values for its pixel data. This can be important when performing operations that require specific data formats, such as high dynamic range (HDR) processing.

Example

// Example of checking if a bitmap uses floating-point values
Bitmap bitmap = new Bitmap();

if (bitmap.IsFloatingPoint)
{
    // Perform operations specific to floating-point bitmaps
    Console.WriteLine("The bitmap uses floating-point values.");
}
else
{
    // Handle non-floating-point bitmaps
    Console.WriteLine("The bitmap does not use floating-point values.");
}