Image module

bytes_per_pixel

procedureextensionsince 0.28.0Source

The size of one pixel in bytes.

Example↗
assert(bytes_per_pixel(.GRAY8) == 1);
assert(bytes_per_pixel(.RGBA8) == 4);
bytes_per_pixel :: (format: Pixel_Format) -> s64

Parameters

format: Pixel_Format

Returns

s64

See also