pub struct BitmapInfoHeaderInfo {
pub header_size: u32,
pub width: i32,
pub height: i32,
pub planes: u16,
pub bit_count: BitCount,
pub compression: Compression,
pub image_size: u32,
pub x_pels_per_meter: i32,
pub y_pels_per_meter: i32,
pub color_used: u32,
pub color_important: u32,
}Expand description
The BitmapInfoHeader Object contains information about the dimensions and color format of a device-independent bitmap (DIB).
Fields§
§header_size: u32HeaderSize (4 bytes): A 32-bit unsigned integer that defines the size of this object, in bytes.
width: i32Width (4 bytes): A 32-bit signed integer that defines the width of the DIB, in pixels. This value MUST be positive.
This field SHOULD specify the width of the decompressed image file, if the Compression value specifies JPEG or PNG format. (Windows NT 3.1, Windows NT 3.5, Windows NT 3.51, Windows 95, and Windows NT 4.0: Neither JPEG nor PNG format is supported.)
height: i32Height (4 bytes): A 32-bit signed integer that defines the height of the DIB, in pixels. This value MUST NOT be zero.
| Value | Meaning |
|---|---|
| 0x00000000 < value | If this value is positive, the DIB is a bottom-up bitmap, and its origin is the lower-left corner. This field SHOULD specify the height of the decompressed image file, if the Compression value specifies JPEG or PNG format. |
| value < 0x00000000 | If this value is negative, the DIB is a top-down bitmap, and its origin is the upper-left corner. Top-down bitmaps do not support compression. |
planes: u16Planes (2 bytes): A 16-bit unsigned integer that defines the number of planes for the target device. This value MUST be 0x0001.
bit_count: BitCountBitCount (2 bytes): A 16-bit unsigned integer that defines the number of bits that define each pixel and the maximum number of colors in the DIB. This value MUST be in the BitCount Enumeration.
compression: CompressionCompression (4 bytes): A 32-bit unsigned integer that defines the compression mode of the DIB. This value MUST be in the Compression Enumeration.
This value MUST NOT specify a compressed format if the DIB is a top-down bitmap, as indicated by the Height value.
image_size: u32ImageSize (4 bytes): A 32-bit unsigned integer that defines the size, in bytes, of the image.
If the Compression value is BI_RGB, this value SHOULD be zero and MUST be ignored. (Windows implementations might write a nonzero value to this field, but it is ignored when the metafile is parsed.)
If the Compression value is BI_JPEG or BI_PNG, this value MUST specify the size of the JPEG or PNG image buffer, respectively.
x_pels_per_meter: i32XPelsPerMeter (4 bytes): A 32-bit signed integer that defines the horizontal resolution, in pixels-per-meter, of the target device for the DIB.
y_pels_per_meter: i32YPelsPerMeter (4 bytes): A 32-bit signed integer that defines the vertical resolution, in pixels-per-meter, of the target device for the DIB.
color_used: u32ColorUsed (4 bytes): A 32-bit unsigned integer that specifies the number of indexes in the color table used by the DIB, as follows:
- If this value is zero, the DIB uses the maximum number of colors that correspond to the BitCount value.
- If this value is nonzero and the BitCount value is less than 16, this value specifies the number of colors used by the DIB.
- If this value is nonzero and the BitCount value is 16 or greater, this value specifies the size of the color table used to optimize performance of the system palette.
Note If this value is nonzero and greater than the maximum possible size of the color table based on the BitCount value, the maximum color table size SHOULD be assumed.
color_important: u32ColorImportant (4 bytes): A 32-bit unsigned integer that defines the number of color indexes that are required for displaying the DIB. If this value is zero, all color indexes are required.
A DIB is specified by a DeviceIndependentBitmap Object.
When the array of pixels in the DIB immediately follows the BitmapInfoHeader, the DIB is a packed bitmap. In a packed bitmap, the ColorUsed value MUST be either 0x00000000 or the actual size of the color table.
Trait Implementations§
Source§impl Clone for BitmapInfoHeaderInfo
impl Clone for BitmapInfoHeaderInfo
Auto Trait Implementations§
impl Forget for BitmapInfoHeaderInfo
impl Freeze for BitmapInfoHeaderInfo
impl Move for BitmapInfoHeaderInfo
impl RefUnwindSafe for BitmapInfoHeaderInfo
impl Send for BitmapInfoHeaderInfo
impl Sync for BitmapInfoHeaderInfo
impl Unpin for BitmapInfoHeaderInfo
impl UnsafeUnpin for BitmapInfoHeaderInfo
impl UnwindSafe for BitmapInfoHeaderInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.