int Height { get; set; }

robot_2Generated
code_blocksInput

Description

The Height property of the Bitmap class represents the vertical dimension of the bitmap in pixels. It provides the number of pixels from the top to the bottom of the bitmap image.

Usage

Use the Height property to retrieve the height of a bitmap when you need to perform operations that depend on the bitmap's dimensions, such as drawing, resizing, or iterating over pixels.

Example

// Example of accessing the Height property of a Bitmap
Bitmap myBitmap = new Bitmap();
int bitmapHeight = myBitmap.Height;

// Use the height for some operation
if (bitmapHeight > 100)
{
    // Perform some action if the bitmap is taller than 100 pixels
}