docs
Loading...
Searching...
No Matches
BitmapFormatInfo

#include <Ultralight/Bitmap.h>

Overview

Block geometry for a BitmapFormat.

Uncompressed formats have a 1x1 block whose block_bytes equals the bytes-per-pixel. Block-compressed (BCn) formats have a 4x4 block. A bitmap's row pitch and surface size are derived from the block geometry:

row_pitch = ceil(width / block_width) * block_bytes
surface_size = row_pitch * ceil(height / block_height)
uint32_t block_width
Width of one block, in pixels (1 for uncompressed, 4 for BCn).
Definition Bitmap.h:131
uint32_t block_height
Height of one block, in pixels (1 for uncompressed, 4 for BCn).
Definition Bitmap.h:136
uint32_t block_bytes
Size of one block, in bytes (equals bytes-per-pixel when the block is 1x1).
Definition Bitmap.h:141

For a 1x1 block this reduces to width * block_bytes and row_pitch * height.

Public Attributes

uint32_t block_width
 Width of one block, in pixels (1 for uncompressed, 4 for BCn).
uint32_t block_height
 Height of one block, in pixels (1 for uncompressed, 4 for BCn).
uint32_t block_bytes
 Size of one block, in bytes (equals bytes-per-pixel when the block is 1x1).

Member Data Documentation

◆ block_bytes

uint32_t block_bytes

Size of one block, in bytes (equals bytes-per-pixel when the block is 1x1).

◆ block_height

uint32_t block_height

Height of one block, in pixels (1 for uncompressed, 4 for BCn).

◆ block_width

uint32_t block_width

Width of one block, in pixels (1 for uncompressed, 4 for BCn).


The documentation for this struct was generated from the following file: