Skip to main content

bytes_per_pixel

Function bytes_per_pixel 

Source
pub fn bytes_per_pixel(format: PixelFormat) -> Option<usize>
Expand description

Bytes per single pixel for an uncompressed PixelFormat.

Returns None for compressed variants — they are addressed by block, not pixel.

The match is exhaustive (no wildcard). If raylib adds a new PixelFormat variant in a future version, this function will fail to compile, surfacing the change rather than silently returning None.